diff options
authorGatis Paeglis <>2018-11-26 15:23:27 +0100
committerGatis Paeglis <>2018-11-30 14:05:04 +0000
commit0de4b326d8e02c228ebefcac1abe069c45cbb5c4 (patch)
parente11a3b3f3e41050e048a586a8de2bd68c5ed3cc8 (diff)
xcb: fix issue with dialogs hidden by other windows
This was a regression from Qt4, due to not setting the window group leader in WM_HINTS property. Qt4 did set this property. It was not obvious that something was missing because of the similarly named WM_CLIENT_LEADER property, which we do set. Testing revealed that setting WM_CLIENT_LEADER is sufficient on some DEs, e.g. KDE, Unity, but did not have the desired effect on e.g Gnome and XFCE. EWMH/ICCCM specs are known to be ambiguous, WM_CLIENT_LEADER is only mentioned in the section on the session management, so it is not surprising that there is this inconsistency between various WMs. This patch merely restores a lost WM hint. This solves the reported issues on major desktops. If we support calling show() on a dialog before its parent has been shown is still an open question, which should be handled in QTBUG-72040. Task-number: QTBUG-56829 Fixes: QTBUG-46626 Fixes: QTBUG-70756 Task-number: QTBUG-72040 Change-Id: Id2c575850e5f4f5af3e57963c577d33572e30b6e Reviewed-by: Shawn Rutledge <>
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 891fe6b155..65e1c71531 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -501,6 +501,8 @@ void QXcbWindow::create()
// from various setter functions for adjusting the hints.
xcb_wm_hints_t hints;
memset(&hints, 0, sizeof(hints));
+ hints.window_group = connection()->clientLeader();
xcb_set_wm_hints(xcb_connection(), m_window, &hints);
xcb_window_t leader = connection()->clientLeader();