diff options
author | Olivier Fourdan <fourdan@xfce.org> | 2021-02-02 20:40:59 +0100 |
---|---|---|
committer | Olivier Fourdan <fourdan@xfce.org> | 2021-02-02 20:40:59 +0100 |
commit | 4fdcd5999dd87ca0199f2a0d5f92d35481815bf5 (patch) | |
tree | 73d8bc2699bfc3b0b3a039e0a4a052b9d5523659 /common | |
parent | 9e930e7e00f7a6125882cfb994eb1b9715f631cc (diff) | |
download | xfwm4-4fdcd5999dd87ca0199f2a0d5f92d35481815bf5.tar.gz |
netwm: Do not use _NET_WM_PING in multi-screen
GDK dropped support for multi-screen several years ago.
Unfortunately, the code in GDK's _gdk_wm_protocols_filter() checks for
the default root window when dealing with _NET_WM_PING messages, and
that will cause an event loop when trying to use it on a multi-screen
setup.
Avoid the issue by not using _NET_WM_PING on multi-screen setups.
Signed-off-by: Olivier Fourdan <fourdan@xfce.org>
Closes:https://gitlab.xfce.org/xfce/xfwm4/-/issues/506
Diffstat (limited to 'common')
-rw-r--r-- | common/xfwm-common.c | 8 | ||||
-rw-r--r-- | common/xfwm-common.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/common/xfwm-common.c b/common/xfwm-common.c index d61c0ec28..673f157ef 100644 --- a/common/xfwm-common.c +++ b/common/xfwm-common.c @@ -214,3 +214,11 @@ xfwm_make_display_name (GdkScreen *screen) return substitute_screen_number (name, number); } + + + +gboolean +xfwm_is_default_screen (GdkScreen *screen) +{ + return gdk_x11_screen_get_screen_number (screen) == gdk_x11_get_default_screen(); +} diff --git a/common/xfwm-common.h b/common/xfwm-common.h index 23a95d8ba..c652b955e 100644 --- a/common/xfwm-common.h +++ b/common/xfwm-common.h @@ -47,4 +47,6 @@ gint xfwm_get_n_monitors (GdkScreen *screen); gchar *xfwm_make_display_name (GdkScreen *screen); +gboolean xfwm_is_default_screen (GdkScreen *screen); + #endif /* !__COMMON_H__ */ |