[Xfce4-commits] [xfce/xfwm4] 01/01: netwm: Make docks and spash screens appear focused

noreply at xfce.org noreply at xfce.org
Mon Mar 6 16:35:50 CET 2017


This is an automated email from the git hooks/post-receive script.

olivier pushed a commit to branch master
in repository xfce/xfwm4.

commit 0feb29e78bb3b36387950dc2fb8d991ac875a374
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Mon Mar 6 16:24:51 2017 +0100

    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.
---
 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 fd8b730..6342cae 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 f779bc8..e8a0bda 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];

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list