From 690579bda36ad3ba039431ebaa5d0cb57f4536b9 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Thu, 10 Feb 2011 16:05:02 +0100 Subject: Fixed resizing popups with QSizeGrip on X11 Qt::Popup implicitly means Qt::X11BypassWindowManagerHint, and according to ICCCM 4.1.5 window manager should not move or resize windows that have override-redirect flag set (i.e. X11BypassWindowManagerHint). Task-number: QTBUG-11447 Reviewed-by: Olivier Goffart --- src/gui/widgets/qsizegrip.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/widgets/qsizegrip.cpp b/src/gui/widgets/qsizegrip.cpp index f2ea1bf..630aecf 100644 --- a/src/gui/widgets/qsizegrip.cpp +++ b/src/gui/widgets/qsizegrip.cpp @@ -309,6 +309,7 @@ void QSizeGrip::mousePressEvent(QMouseEvent * e) #ifdef Q_WS_X11 // Use a native X11 sizegrip for "real" top-level windows if supported. if (tlw->isWindow() && X11->isSupportedByWM(ATOM(_NET_WM_MOVERESIZE)) + && !(tlw->windowFlags() & Qt::X11BypassWindowManagerHint) && !tlw->testAttribute(Qt::WA_DontShowOnScreen) && !qt_widget_private(tlw)->hasHeightForWidth()) { XEvent xev; xev.xclient.type = ClientMessage; @@ -420,7 +421,8 @@ void QSizeGrip::mouseMoveEvent(QMouseEvent * e) #ifdef Q_WS_X11 if (tlw->isWindow() && X11->isSupportedByWM(ATOM(_NET_WM_MOVERESIZE)) - && tlw->isTopLevel() && !tlw->testAttribute(Qt::WA_DontShowOnScreen) && !qt_widget_private(tlw)->hasHeightForWidth()) + && tlw->isTopLevel() && !(tlw->windowFlags() & Qt::X11BypassWindowManagerHint) + && !tlw->testAttribute(Qt::WA_DontShowOnScreen) && !qt_widget_private(tlw)->hasHeightForWidth()) return; #endif #ifdef Q_WS_WIN -- cgit v0.12