-
Bug
-
Resolution: Fixed
-
P2: Important
-
None
-
5.15.11, 5.15.16
-
Windows 11, macOS Sonoma
We are seeing graphical glitches in our application, where a widget stacked beneath its sibling will still be painted on top. In other words, sibling painting order is not always being respected when widgets are composited together in the backing store.
This happens when a bottom sibling widget is moved outside of its parent rect, and then back in. We beleive the bug is probably in QWidgetPrivate::moveRect, where destRect and therefore sourceRect are both invalid, since they are cliped to the parent rect. When sourceRect is invalid, it skips over the block of logic that would normally subtract the geometry from childExpose which should leave it empty. When childExpose is not empty, it is erroneously marked dirty for rendering.
Please find the attached trivial reproducer. The reproducer app has a red widget that is stacked beneath a blue widget, so the red widget should never be visible. However, if you press any key, the defect is reproduced and the red widget appears on screen.