diff options
author | Axel Spoerl <[email protected]> | 2022-12-09 13:45:11 +0100 |
---|---|---|
committer | Axel Spoerl <[email protected]> | 2022-12-12 09:47:03 +0100 |
commit | 6a3627b6c5aa5109a80024f3d7b0f938504f7ffe (patch) | |
tree | 4841d24219df8fd4f68475d0bd584ed9a553abf8 /examples/widgets/doc/src | |
parent | 0943b5d65d1a5699fb2085f4d92c9112fb08871d (diff) |
Set geometry property in QXcbWindow after checking minimum size
QXcbWindow::create() bound the window's size to windowMinimumSize(),
after its size had been inherited from parent().
QPlatformWindow::setGeometry() was called before that sanity check.
When a fullscreen window is re-mapped from a deactivated screen to the
remaining screen, the call to QPlatformWindow::setGeometry() assigns
an invalid QRect to QPlatformWindowPrivate::rect
The negative int values x2 and/or y2 cause
QXcbBackingStoreImage::flushPixmap to address unmapped memory and
crash.
This patch moves the call to QPlatformWindow::setGeometry() from
before to after bounding to a minimum value. That assures a valid
rectangle to be assigned in all cases.
Fixes: QTBUG-109226
Pick-to: 6.4 6.2 5.15
Change-Id: I349a0f3c721059a9013a275de5b4cb147fbdd7a1
Reviewed-by: Liang Qi <[email protected]>
Diffstat (limited to 'examples/widgets/doc/src')
0 files changed, 0 insertions, 0 deletions