summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindow_p.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-03-26 08:27:02 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-03-26 08:27:02 +0100
commit8f1acd29e4d39383752899d6d05d484eb9d7935b (patch)
treee749c4bebdd49ff702dfaa062902cbb6016cfd82 /src/gui/kernel/qwindow_p.h
parent945198fd237a83348feb4537d811565a2c2cd8e0 (diff)
parent2fedce8ed8451fd9b14bc214dc26e79b0d5ab7bd (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Diffstat (limited to 'src/gui/kernel/qwindow_p.h')
-rw-r--r--src/gui/kernel/qwindow_p.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindow_p.h b/src/gui/kernel/qwindow_p.h
index 25f9a8a9b2..b8fa77bef0 100644
--- a/src/gui/kernel/qwindow_p.h
+++ b/src/gui/kernel/qwindow_p.h
@@ -90,6 +90,7 @@ public:
, receivedExpose(false)
, positionPolicy(WindowFrameExclusive)
, positionAutomatic(true)
+ , resizeAutomatic(true)
, contentOrientation(Qt::PrimaryOrientation)
, opacity(qreal(1.0))
, minimumSize(0, 0)
@@ -156,6 +157,8 @@ public:
virtual void processSafeAreaMarginsChanged() {};
bool isPopup() const { return (windowFlags & Qt::WindowType_Mask) == Qt::Popup; }
+ void setAutomaticPositionAndResizeEnabled(bool a)
+ { positionAutomatic = resizeAutomatic = a; }
static QWindowPrivate *get(QWindow *window) { return window->d_func(); }
@@ -179,6 +182,11 @@ public:
bool receivedExpose;
PositionPolicy positionPolicy;
bool positionAutomatic;
+ // resizeAutomatic suppresses resizing by QPlatformWindow::initialGeometry().
+ // It also indicates that width/height=0 is acceptable (for example, for
+ // the QRollEffect widget) and is thus not cleared in setGeometry().
+ // An alternative approach might be using -1,-1 as a default size.
+ bool resizeAutomatic;
Qt::ScreenOrientation contentOrientation;
qreal opacity;
QRegion mask;