summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindow_p.h
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-03-31 12:39:42 +0200
committerLiang Qi <liang.qi@qt.io>2019-03-31 12:39:42 +0200
commit29f01b32f58573b23bd35857376f6f92e15382a3 (patch)
treeb1a044f87e4b18d5ddd779dc1b63161ded1c3d1a /src/gui/kernel/qwindow_p.h
parent300940a6c9eb0f74cefda7d76a5d19f56ec50253 (diff)
parent0a7302abbc47a0db25f119ee4f5144bbaf0d9d6f (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts: src/corelib/configure.json Change-Id: I93ac67f3bf4844bc7c691183e94bceb922b7b919
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 1098321135..eb0b606598 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;