summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindow.cpp
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2017-08-08 15:27:53 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2017-08-11 13:08:24 +0000
commit096b56f336e5bb994d46f073d55496d36d38e6b1 (patch)
tree020f9d3aa3db11c369c57a03152346dd17c34ded /src/gui/kernel/qwindow.cpp
parent255abc1e5a3397bf14e9854388881cd80f0bd2e3 (diff)
macOS: Create NSView as initially hidden, to match QWindow behavior
Change-Id: I25af6635ea9b6aa3fcc642fa2da0553341aabda8 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/gui/kernel/qwindow.cpp')
-rw-r--r--src/gui/kernel/qwindow.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 1d8d6dfc95..ac2c79b9ab 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -343,8 +343,15 @@ void QWindowPrivate::setVisible(bool visible)
return;
// We only need to create the window if it's being shown
- if (visible)
+ if (visible) {
+ // FIXME: At this point we've already updated the visible state of
+ // the QWindow, so any platform pulling out the visible state during
+ // creation to set on the native window will create a visible window,
+ // which may result in resize and expose events before the show event
+ // sent below. This code assumes that the platform will set the window
+ // to be hidden, until receiving a setVisible call below.
q->create();
+ }
}
if (visible) {