qt6-bb10/src/widgets
Tor Arne Vestbø 697e1b0397 Decouple rate-limiting of paint-on-screen widgets from top level widget
As part of eacd58d4e7, a mechanism was
added to prevent posting redundant UpdateRequest events to the top
level widget, managed by QWidgetRepaintManager. The mechanism relied
on a boolean that was set when posting an update request event, and
reset when processing the event for the top level widget, as part
of QWidgetRepaintManager::sync().

However, for paint-on-screen widgets, we don't post an update request
to the top level, we post it to the paint-on-screen widget directly.
And when processing that event, we don't paint the widget though the
normal QWidgetRepaintManager machinery, but instead call the paint
event via QWidgetPrivate::paintOnScreen().

As a result, an update() on a paint-on-screen widget would result
in never receiving updates for non-paint-on-screen widgets, as
we assumed there was no reason to send further update requests.

We could fix this by clearing the updateRequestSent flag as part
of the paintOnScreen() code path, but that's incorrect as the flag
represents whether the top level QWidgetRepaintManager needs an
update request event or not, and would lead to missed updates
to normal widgets until the paint-on-screen widget finishes its
update.

Instead, we only set updateRequestSent if we're posting update
requests for non-paint-on-screen widgets, which in practice
means the top level widget.

The paint on screen logic in QWidgetRepaintManager::markDirty
still takes care of rate-limiting the update requests to the
paint-on-screen widget, by comparing the dirty area of the
widget.

There is definite room for improvement here, especially in the
direction of handling update requests via QWindow::requestUpdate
instead of manually posted events, but for now this will have to
do.

Fixes: QTBUG-80167
Pick-to: 6.7 6.6 6.5 6.2 5.15
Change-Id: Ib5685de7ca2fd7cd7883a25bb7bc0255ea242d30
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2024-04-04 01:26:56 +02:00
..
accessible Fix -Wimplicit-fallthrough for clang 2024-03-01 03:04:06 +00:00
compat Add parent arg to QFileDialog::getOpenFileContent and saveFileContent 2023-12-28 17:16:12 +01:00
dialogs Don't accept QFileDialog when disabled item is activated 2024-03-21 19:05:41 -04:00
doc Doc: Remove table for listing images 2024-03-22 14:15:54 +01:00
effects Move qt_blurImage to Qt GUI 2024-03-14 19:11:52 +01:00
graphicsview QGraphicsProxyWidget: use focus abstraction instead of focus_next/prev 2024-03-18 17:21:22 +01:00
itemviews Avoid QRubberBand leaving artefacts in QListView 2024-03-08 20:50:51 +01:00
kernel Decouple rate-limiting of paint-on-screen widgets from top level widget 2024-04-04 01:26:56 +02:00
platform/ios cmake: Generate Apple privacy manifest files for Qt modules 2024-02-13 21:53:34 +01:00
styles QWindows11Style: HighDPI aware qDrawPlainRoundedRect 2024-03-15 03:59:26 +00:00
util Doc: Update image in QSystemTray example 2023-12-14 20:06:33 +01:00
widgets QMenu: clear popup screen after exec() 2024-03-27 20:26:01 +01:00
CMakeLists.txt cmake: Generate Apple privacy manifest files for Qt modules 2024-02-13 21:53:34 +01:00
Qt6WidgetsMacros.cmake Remove the Unnecessary CMake Module, `include(CMakeParseArguments)` 2022-10-25 20:14:35 +02:00
QtWidgets.dynlist
configure.cmake Introduce new empty Windows 11 style 2023-10-27 18:32:54 +02:00
qt_cmdline.cmake Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00