summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2018-02-22 19:03:04 +0200
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2018-02-22 19:03:04 +0200
commitb3ef8872faef8e6b0277a3e6db670f714cd3db50 (patch)
treebf2981fe27b3f01cdfdbb22c4270fd90551d2701
parent94950da425ad9e170b05e5ae1c7941d3559d7a48 (diff)
downloadmetacity-b3ef8872faef8e6b0277a3e6db670f714cd3db50.tar.gz
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
-rw-r--r--src/core/window.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/core/window.c b/src/core/window.c
index 277613f2..1080a830 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