diff options
author | Oleg Yadrov <oleg.yadrov@qt.io> | 2017-01-18 11:09:37 -0800 |
---|---|---|
committer | Oleg Yadrov <oleg.yadrov@qt.io> | 2017-01-19 17:55:25 +0000 |
commit | 3edeb5c909a4ec62440e2075b9d49ec256a1ba68 (patch) | |
tree | dd69e039da0700194045342af9bd2b0cedf355f3 | |
parent | 814a2c8ddf48347612a61a7f7155796f766d67d3 (diff) |
Cocoa: fix regression preventing windows from showing up
The regression was introduced by 593ab638609 which fixed another bug
related to window modality. To determine whether the window needs to be
(made key and ordered front) or just (ordered front), instead of calling
currentModalSession() which might change internal state of event
dispatcher we just check if cocoaModalSessionStack is empty or not.
Task-number: QTBUG-57991
Task-number: QTBUG-56166
Change-Id: I6c4f92860d8c93decd44e572af1690ed7be6f1f0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 602da0a175..40666772c5 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -695,7 +695,7 @@ void QCocoaWindow::setVisible(bool visible) if (cocoaEventDispatcher) cocoaEventDispatcherPrivate = static_cast<QCocoaEventDispatcherPrivate *>(QObjectPrivate::get(cocoaEventDispatcher)); - if (!(cocoaEventDispatcherPrivate && cocoaEventDispatcherPrivate->currentModalSession())) + if (cocoaEventDispatcherPrivate && cocoaEventDispatcherPrivate->cocoaModalSessionStack.isEmpty()) [m_nsWindow makeKeyAndOrderFront:nil]; else [m_nsWindow orderFront:nil]; |