1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:28:11 +00:00

After moving a window, try to repaint a bit less.

Only repaint windows that intersect either the old or the new rect.
Also only repaint those rects in the root widget.
This commit is contained in:
Andreas Kling 2018-10-12 19:39:48 +02:00
parent 74aa4d5345
commit 6f9e0e3876
9 changed files with 111 additions and 23 deletions

View file

@ -13,10 +13,15 @@ RootWidget::~RootWidget()
void RootWidget::onPaint(PaintEvent& event)
{
//printf("RootWidget::onPaint\n");
Painter painter(*this);
painter.fillRect(Rect(0, 0, 800, 600), Color(0x40, 0x40, 0x40));
Widget::onPaint(event);
printf("RootWidget::onPaint: %d,%d %dx%d\n",
event.rect().x(),
event.rect().y(),
event.rect().width(),
event.rect().height());
Painter painter(*this);
painter.fillRect(event.rect(), Color(0x40, 0x40, 0x40));
}
void RootWidget::onMouseMove(MouseEvent& event)