From ef1d971fb22342c88b557458a451238ecfa0f656 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Mon, 6 Mar 2017 16:24:51 +0100 Subject: 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) --- src/client.h | 2 ++ src/netwm.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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]; -- cgit v1.2.1