Cocoa: Make QWidget::showNormal() work on minimized windows

Cocoa sets the NSWindow hidden when it's minimized, and we don't
propagate that further to QWindow or QWidget (QWidget's 'visible'
documentation is quite ambiguous about that state).

The obvious fix is to check for QWindow's visibility. However, this
might need to be corrected later if we truly want the visible state
to be in sync.

Task-number: QTBUG-31117
Change-Id: I457452eff75e6ea746a0ef5351104f8bbb65f98b
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
This commit is contained in:
Gabriel de Dietrich 2013-06-05 15:47:55 +02:00 committed by The Qt Project
parent bfab741cb7
commit d8f4abec71

View File

@ -486,7 +486,7 @@ void QCocoaWindow::setWindowFlags(Qt::WindowFlags flags)
void QCocoaWindow::setWindowState(Qt::WindowState state)
{
if ([m_nsWindow isVisible])
if (window()->isVisible())
syncWindowState(state); // Window state set for hidden windows take effect when show() is called.
}