Cocoa: fix regression preventing windows from showing up
The regression was introduced by 593ab63860 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>
bb10
parent
814a2c8ddf
commit
3edeb5c909
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Reference in New Issue