mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:28:12 +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
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