summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindow_p.h
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2017-01-31 13:34:41 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2017-02-09 14:10:28 +0000
commit0c6911e5cde24c45d6f2c08b6e71064bdd1eccfa (patch)
tree2ad5960b2a3ad1d09ab2043058b3e137f5c5def9 /src/gui/kernel/qwindow_p.h
parenta57f2128b15d363b88c063325eac1d36c2ff1578 (diff)
QWindow: don't destroy foreign windows
Calling QWindow::destroy() is documented to "release the native platform resources associated with this window.", but in the case of foreign windows we do not control the native platform resource, so we shouldn't destroy the platform window until the QWindow is destroyed. This also allows code paths to defer to the platform window to answer questions like winId() instead of having to duplicate the ID on the QWindow side in _q_foreignWinId. Change-Id: Ie00ee570bdddde958d97d49edcba2bc1bf519a99 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/kernel/qwindow_p.h')
-rw-r--r--src/gui/kernel/qwindow_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindow_p.h b/src/gui/kernel/qwindow_p.h
index 95c6abf428..d1727a1c57 100644
--- a/src/gui/kernel/qwindow_p.h
+++ b/src/gui/kernel/qwindow_p.h
@@ -137,6 +137,7 @@ public:
bool windowRecreationRequired(QScreen *newScreen) const;
void create(bool recursive);
+ void destroy();
void setTopLevelScreen(QScreen *newScreen, bool recreate);
void connectToScreen(QScreen *topLevelScreen);
void disconnectFromScreen();