diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-10-18 19:19:52 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-10-24 23:56:43 +0200 |
commit | ea0b99c0064806397081a6f19a2af56abea726de (patch) | |
tree | 730556b53a8575e039f1d097bd2762a28ad30ac2 /src/plugins/platforms/cocoa | |
parent | 1fd1ffd03d6889273f574c698e07c611bd311fd9 (diff) |
macOS: Explicitly mark NSView as needing display when unhiding it
AppKit doesn't do this automatically for us, and since we may have
decided to not draw anything when the view was not exposed, we need
to inform clients that its time to draw something now.
Pick-to: 6.5 6.6
Change-Id: Ib2dd969632898ba5640d6848356acd1b97da652d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 56322a9963..ff668c1701 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -346,6 +346,10 @@ void QCocoaWindow::setVisible(bool visible) // Make the NSView visible first, before showing the NSWindow (in case of top level windows) m_view.hidden = NO; + // Explicitly mark the view as needing display, as we may + // not have drawn anything to the view when it was hidden. + [m_view setNeedsDisplay:YES]; + if (isContentView()) { QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents); |