diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-02-09 16:37:37 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-02-15 23:00:43 +0000 |
commit | ee0edf1b0aa36cfdd5d9628b2bbeb1fb590a3290 (patch) | |
tree | 6ce0b71ab2a303ab21bc3964f2ec3ac7a95777d0 /src/gui/kernel/qwindow_p.h | |
parent | bf2160e72cd8840a8e604438cbdc807483ac980a (diff) |
QWindow: prevent window reparenting into Qt::Desktop windows
Qt::Desktop exists to support QDesktopWidget, which predates the QScreen
API. QWidget internally has checks that prevents you from reparenting a
QWidget into a QDesktopWidget, so we should have the same limitations on
the QWindow level. This allows platform plugins to implement Qt::Desktop
as simple (possibly shared) wrappers around QScreen without having to
allocate native window resources for each desktop window.
Change-Id: Ia1bac506febd3d827a6e0b8ad3bfd95be0cc7f9d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/gui/kernel/qwindow_p.h')
-rw-r--r-- | src/gui/kernel/qwindow_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qwindow_p.h b/src/gui/kernel/qwindow_p.h index d1727a1c57..272401453a 100644 --- a/src/gui/kernel/qwindow_p.h +++ b/src/gui/kernel/qwindow_p.h @@ -113,7 +113,7 @@ public: { } - void init(); + void init(QScreen *targetScreen = nullptr); void maybeQuitOnLastWindowClosed(); #ifndef QT_NO_CURSOR |