mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibGUI: Only redraw the dirty rect in GWidget.
There is some trouble here with the asynchronous nature of WindowServer and the single per-window backing store we're drawing into. If we start repainting a widget with a pending invalidation, that invalidation might get flushed by the WindowServer mid-paint.
This commit is contained in:
parent
ea6678b7b3
commit
a9e60fc800
Notes:
sideshowbarker
2024-07-19 15:59:55 +09:00
Author: https://github.com/awesomekling
Commit: a9e60fc800
4 changed files with 10 additions and 8 deletions
|
@ -61,7 +61,7 @@ void GWidget::paintEvent(GPaintEvent& event)
|
|||
{
|
||||
if (fillWithBackgroundColor()) {
|
||||
Painter painter(*this);
|
||||
painter.fill_rect(rect(), backgroundColor());
|
||||
painter.fill_rect(event.rect(), backgroundColor());
|
||||
}
|
||||
for (auto* ch : children()) {
|
||||
auto* child = (GWidget*)ch;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue