summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <fourdan@xfce.org>2017-03-06 16:24:51 +0100
committerOlivier Fourdan <fourdan@xfce.org>2017-03-07 15:05:04 +0100
commitef1d971fb22342c88b557458a451238ecfa0f656 (patch)
treeeb5b0fed9bcc777d22bbea6231f1d553d4b7a9fe
parent6b94d5a212772d4015769a4e4ad83f62478b0bc3 (diff)
downloadxfwm4-ef1d971fb22342c88b557458a451238ecfa0f656.tar.gz
netwm: Make docks and spash screens appear focused
The panel is a dock window, and may appear differently as it is not focused by default by the window manager. Set the NET_WM_STATE_FOCUSED property on windows of type dock or spashscreen so that they don't get the state GTK_STATE_FLAG_BACKDROP set by default. (cherry picked from commit 0feb29e78bb3b36387950dc2fb8d991ac875a374)
-rw-r--r--src/client.h2
-rw-r--r--src/netwm.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/client.h b/src/client.h
index 7aa93f37d..3b2d6f26f 100644
--- a/src/client.h
+++ b/src/client.h
@@ -206,6 +206,8 @@
WINDOW_UTILITY)
#define WINDOW_TYPE_DONT_FOCUS (WINDOW_SPLASHSCREEN | \
WINDOW_DOCK)
+#define WINDOW_TYPE_STATE_FOCUSED (WINDOW_SPLASHSCREEN | \
+ WINDOW_DOCK )
/* Which bits of opacity are applied */
#define OPACITY_MOVE (1<<0)
diff --git a/src/netwm.c b/src/netwm.c
index ef3552ce1..9ef8f73f4 100644
--- a/src/netwm.c
+++ b/src/netwm.c
@@ -130,7 +130,7 @@ clientSetNetState (Client * c)
TRACE ("clientSetNetState : demands_attention");
data[i++] = display_info->atoms[NET_WM_STATE_DEMANDS_ATTENTION];
}
- if (c == clientGetFocus ())
+ if (c == clientGetFocus () || c->type & WINDOW_TYPE_STATE_FOCUSED)
{
TRACE ("clientSetNetState : focused");
data[i++] = display_info->atoms[NET_WM_STATE_FOCUSED];