From f453cb83e261767bac1f818e401b4e96d9f6e264 Mon Sep 17 00:00:00 2001 From: Andrey Butirsky Date: Fri, 17 Sep 2021 15:03:24 +0300 Subject: [PATCH] fix wrong popups Z-order after applying "Show Desktop" effect For some reason, layers are change after applying Show Desktop effect, so we will have AboveLayer for our popups and Desktop, and NotificationLayer for Dock which hides us. Also, OSD and critical notifications were always hidden by our popups. This patch solves both the issues. Usual notifications will still be hidden, but hopefully it's not a big issue. BUG: 442605 --- src/abstract_client.cpp | 4 ++-- src/utils.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/abstract_client.cpp b/src/abstract_client.cpp index 61f40adf00..711416f7e1 100644 --- a/src/abstract_client.cpp +++ b/src/abstract_client.cpp @@ -293,6 +293,8 @@ Layer AbstractClient::belongsToLayer() const return NotificationLayer; return layerForDock(); } + if (isPopupWindow()) + return PopupLayer; if (isOnScreenDisplay()) return OnScreenDisplayLayer; if (isNotification()) @@ -308,8 +310,6 @@ Layer AbstractClient::belongsToLayer() const return ActiveLayer; if (keepAbove()) return AboveLayer; - if (isPopupWindow()) - return UnmanagedLayer; return NormalLayer; } diff --git a/src/utils.h b/src/utils.h index e3f52f2026..44e9d12757 100644 --- a/src/utils.h +++ b/src/utils.h @@ -44,6 +44,7 @@ enum Layer { AboveLayer, NotificationLayer, // layer for windows of type notification ActiveLayer, // active fullscreen, or active dialog + PopupLayer, // tooltips, sub- and context menus CriticalNotificationLayer, // layer for notifications that should be shown even on top of fullscreen OnScreenDisplayLayer, // layer for On Screen Display windows such as volume feedback UnmanagedLayer, // layer for override redirect windows.