diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-07-19 22:10:52 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-07-20 17:47:48 +0200 |
commit | bd143f7df3be50b15b617275b0db2aac292b9a26 (patch) | |
tree | fb6cee1f44f70b2a47f362f247704ec9327fb4c0 /src/gui/kernel/qwindow.cpp | |
parent | 5b1befa31a9851397d56363f058568094d11f5f3 (diff) |
Add fixme note to QWindowPrivate::setVisible about visibility during create
Change-Id: I71cb5b560538887f85d92178ff17eaaecaf06904
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/gui/kernel/qwindow.cpp')
-rw-r--r-- | src/gui/kernel/qwindow.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index 1ba81387a9..3fed7c3776 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -354,8 +354,14 @@ 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 if the platform layer reads the window state during + // creation, and reflects that in the native window, it will end up + // with a visible window. This may in turn result in resize or expose + // events from the platform before we have sent the show event below. q->create(); + } } if (visible) { |