From 12b88cc7bbb1378f0e7420aaf35294e8dca01086 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 26 Jan 2012 11:01:13 +0100 Subject: QSizeGrip: Fix Windows. Reactivate the old Windows code. Change-Id: Ied467cf83d89c76a0fa8edf3c76bb207cc2a70e0 Reviewed-by: Oliver Wolff --- src/widgets/dialogs/qmessagebox.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/widgets/dialogs') diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index 115c41a082..200c18bbc3 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -73,13 +73,9 @@ QT_BEGIN_NAMESPACE #ifdef Q_OS_WIN -static inline HMENU qt_getWindowsSystemMenu(const QWidget *w) +HMENU qt_getWindowsSystemMenu(const QWidget *w) { - QWindow *window = w->windowHandle(); - if (!window) - if (const QWidget *nativeParent = w->nativeParentWidget()) - window = nativeParent->windowHandle(); - if (window) + if (QWindow *window = QApplicationPrivate::windowForWidget(w)) if (void *handle = QGuiApplication::platformNativeInterface()->nativeResourceForWindow("handle", window)) return GetSystemMenu(reinterpret_cast(handle), FALSE); return 0; -- cgit v1.2.3