From ae36abb1ca3a645ac816667d6290121ac641cb01 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Sat, 27 Mar 2021 21:42:47 +1100 Subject: [PATCH] [client] x11: fallback to a utility window if motif atom is missing If the window manager does not support the motif hints then fallback to creating a utility window, do not do both. A utility window is a sub-optimal fallback as it may prevent the application being shown in the taskbar or as a running application as has been reported on KDE. --- client/displayservers/X11/x11.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/client/displayservers/X11/x11.c b/client/displayservers/X11/x11.c index 518ead7b..7f99a86e 100644 --- a/client/displayservers/X11/x11.c +++ b/client/displayservers/X11/x11.c @@ -202,17 +202,20 @@ static bool x11Init(const LG_DSInitParams params) 5 ); } - - XChangeProperty( - x11.display, - x11.window, - x11atoms._NET_WM_WINDOW_TYPE, - XA_ATOM, - 32, - PropModeReplace, - (unsigned char *)&x11atoms._NET_WM_WINDOW_TYPE_UTILITY, - 1 - ); + else + { + // fallback to making a utility window, not ideal but better then nothing + XChangeProperty( + x11.display, + x11.window, + x11atoms._NET_WM_WINDOW_TYPE, + XA_ATOM, + 32, + PropModeReplace, + (unsigned char *)&x11atoms._NET_WM_WINDOW_TYPE_UTILITY, + 1 + ); + } } else {