diff options
Diffstat (limited to 'src/widgets/kernel/qwidget_p.h')
-rw-r--r-- | src/widgets/kernel/qwidget_p.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/widgets/kernel/qwidget_p.h b/src/widgets/kernel/qwidget_p.h index c073b8fb03..99ec38e050 100644 --- a/src/widgets/kernel/qwidget_p.h +++ b/src/widgets/kernel/qwidget_p.h @@ -181,6 +181,7 @@ struct QTLWExtra { QRect frameStrut; QRect normalGeometry; // used by showMin/maximized/FullScreen Qt::WindowFlags savedFlags; // Save widget flags while showing fullscreen + // ### TODO replace initialScreenIndex with QScreen *, in case the screens change at runtime int initialScreenIndex; // Screen number when passing a QDesktop[Screen]Widget as parent. QVector<QPlatformTextureList *> widgetTextures; @@ -342,7 +343,15 @@ public: QPainter *sharedPainter() const; void setSharedPainter(QPainter *painter); QWidgetBackingStore *maybeBackingStore() const; - QWidgetWindow *windowHandle() const; + + enum class WindowHandleMode { + Direct, + Closest, + TopLevel + }; + QWindow *windowHandle(WindowHandleMode mode = WindowHandleMode::Direct) const; + + QScreen *associatedScreen() const; template <typename T> void repaint(T t); @@ -356,6 +365,7 @@ public: void createWinId(); bool setScreenForPoint(const QPoint &pos); + bool setScreen(QScreen *screen); void createTLExtra(); void createExtra(); @@ -1014,13 +1024,6 @@ inline QWidgetBackingStore *QWidgetPrivate::maybeBackingStore() const return x ? x->backingStoreTracker.data() : nullptr; } -inline QWidgetWindow *QWidgetPrivate::windowHandle() const -{ - if (QTLWExtra *x = maybeTopData()) - return x->window; - return nullptr; -} - QT_END_NAMESPACE #endif // QWIDGET_P_H |