diff options
author | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2009-10-27 13:03:06 (GMT) |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2009-10-27 13:03:06 (GMT) |
commit | 138962d1c25a9cbb4375aa09bdeb7901c6536ce1 (patch) | |
tree | 34a5195600077f9b5e229de6328d0f08a446d96b | |
parent | 0fd6390800969d174dba819c54c4183a99e8f83c (diff) | |
download | Qt-138962d1c25a9cbb4375aa09bdeb7901c6536ce1.zip Qt-138962d1c25a9cbb4375aa09bdeb7901c6536ce1.tar.gz Qt-138962d1c25a9cbb4375aa09bdeb7901c6536ce1.tar.bz2 |
Carbon: active window not restored
After closing a window we used to go through the list of
kDocumentWindowClass windows to pick the next one to pop
to front. This patch will search the kMoveableWindowClass
list of windows first, and as such, pop to front any
modal window first
Rev-By: MortenS
-rw-r--r-- | src/gui/kernel/qwidget_mac.mm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index d08f8a9..95c0bed 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -3390,12 +3390,19 @@ void QWidgetPrivate::hide_sys() w = q->parentWidget()->window(); if(!w || (!w->isVisible() && !w->isMinimized())) { #ifndef QT_MAC_USE_COCOA - for(WindowPtr wp = GetFrontWindowOfClass(kDocumentWindowClass, true); - wp; wp = GetNextWindowOfClass(wp, kDocumentWindowClass, true)) { + for (WindowPtr wp = GetFrontWindowOfClass(kMovableModalWindowClass, true); + wp; wp = GetNextWindowOfClass(wp, kMovableModalWindowClass, true)) { if((w = qt_mac_find_window(wp))) break; } if (!w){ + for (WindowPtr wp = GetFrontWindowOfClass(kDocumentWindowClass, true); + wp; wp = GetNextWindowOfClass(wp, kDocumentWindowClass, true)) { + if((w = qt_mac_find_window(wp))) + break; + } + } + if (!w){ for(WindowPtr wp = GetFrontWindowOfClass(kSimpleWindowClass, true); wp; wp = GetNextWindowOfClass(wp, kSimpleWindowClass, true)) { if((w = qt_mac_find_window(wp))) |