summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidget_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/kernel/qwidget_p.h')
-rw-r--r--src/widgets/kernel/qwidget_p.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/widgets/kernel/qwidget_p.h b/src/widgets/kernel/qwidget_p.h
index c073b8fb03..1f36c192f5 100644
--- a/src/widgets/kernel/qwidget_p.h
+++ b/src/widgets/kernel/qwidget_p.h
@@ -342,7 +342,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);
@@ -1014,13 +1022,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