[metacity] window: make docks and spashscreens appear focused



commit b3ef8872faef8e6b0277a3e6db670f714cd3db50
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Feb 22 19:03:04 2018 +0200

    window: make docks and spashscreens appear focused
    
    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.
    
    Based on xfwm4 commit:
    https://git.xfce.org/xfce/xfwm4/commit/?id=0feb29e78bb3

 src/core/window.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 277613f..1080a83 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -8923,7 +8923,17 @@ meta_window_get_frame (MetaWindow *window)
 gboolean
 meta_window_appears_focused (MetaWindow *window)
 {
-  return window->has_focus || (window->attached_focus_window != NULL);
+  if (window->has_focus)
+    return TRUE;
+
+  if (window->attached_focus_window != NULL)
+    return TRUE;
+
+  if (window->type == META_WINDOW_DOCK ||
+      window->type == META_WINDOW_SPLASHSCREEN)
+    return TRUE;
+
+  return FALSE;
 }
 
 gboolean


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]