From be6422627d1215f6834f74593dd47c0c65270d90 Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Wed, 23 Sep 2009 12:42:58 +0200 Subject: Calling raise() on a hidden windows makes it visible on Cocoa. [NSWindow orderFront:] on a hidden window will make it visible. So raise_sys() will now check if window is visible before this method is called. Task-number: 255428 Reviewed-by: Richard Moe Gustavsen (cherry picked from commit 9262ee16906fd8e030cd5d2a81d22fe9b791b9f6) --- src/gui/kernel/qwidget_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index d1675f2..0b1a842 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -3613,7 +3613,7 @@ void QWidgetPrivate::raise_sys() QMacCocoaAutoReleasePool pool; if (isRealWindow()) { // Calling orderFront shows the window on Cocoa too. - if (!q->testAttribute(Qt::WA_DontShowOnScreen)) { + if (!q->testAttribute(Qt::WA_DontShowOnScreen) && q->isVisible()) { [qt_mac_window_for(q) orderFront:qt_mac_window_for(q)]; } if (qt_mac_raise_process) { //we get to be the active process now -- cgit v0.12