summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbwindow.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 789229c0a7..063778a1de 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -797,9 +797,9 @@ void QXcbWindow::show()
propagateSizeHints();
// update WM_TRANSIENT_FOR
- const QWindow *tp = window()->transientParent();
- if (isTransient(window()) || tp != 0) {
- xcb_window_t transientXcbParent = 0;
+ xcb_window_t transientXcbParent = 0;
+ if (isTransient(window())) {
+ const QWindow *tp = window()->transientParent();
if (tp && tp->handle())
transientXcbParent = static_cast<const QXcbWindow *>(tp->handle())->winId();
// Default to client leader if there is no transient parent, else modal dialogs can
@@ -812,6 +812,8 @@ void QXcbWindow::show()
1, &transientXcbParent));
}
}
+ if (!transientXcbParent)
+ Q_XCB_CALL(xcb_delete_property(xcb_connection(), m_window, XCB_ATOM_WM_TRANSIENT_FOR));
// update _MOTIF_WM_HINTS
updateMotifWmHintsBeforeMap();
@@ -1173,9 +1175,11 @@ void QXcbWindow::setMotifWindowFlags(Qt::WindowFlags flags)
mwmhints.flags |= MWM_HINTS_DECORATIONS;
bool customize = flags & Qt::CustomizeWindowHint;
- if (type == Qt::Window && !customize)
- flags |= Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint;
-
+ if (type == Qt::Window && !customize) {
+ const Qt::WindowFlags defaultFlags = Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint;
+ if (!(flags & defaultFlags))
+ flags |= defaultFlags;
+ }
if (!(flags & Qt::FramelessWindowHint) && !(customize && !(flags & Qt::WindowTitleHint))) {
mwmhints.decorations |= MWM_DECOR_BORDER;
mwmhints.decorations |= MWM_DECOR_RESIZEH;