diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2011-02-10 15:05:02 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2011-02-10 16:18:15 (GMT) |
commit | 690579bda36ad3ba039431ebaa5d0cb57f4536b9 (patch) | |
tree | e9756af69b283918b6fe375a116f5ec5a5a0297a /src | |
parent | 4f7a73a8281623e3d41e527924fe9c0ffd9977e1 (diff) | |
download | Qt-690579bda36ad3ba039431ebaa5d0cb57f4536b9.zip Qt-690579bda36ad3ba039431ebaa5d0cb57f4536b9.tar.gz Qt-690579bda36ad3ba039431ebaa5d0cb57f4536b9.tar.bz2 |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/widgets/qsizegrip.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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 |