1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-24 01:15:07 +00:00

Rework the rendering model so that clients instantiate backing stores.

This makes interactive resizing work a lot better, althought it's still not
perfect. There are still glitches and unpleasant flashes of zeroed memory.
This commit is contained in:
Andreas Kling 2019-02-20 21:59:13 +01:00
parent e0b81ee4c9
commit fa02d2a39b
17 changed files with 185 additions and 46 deletions

View file

@ -28,11 +28,14 @@ void GWidget::set_relative_rect(const Rect& rect)
{
if (rect == m_relative_rect)
return;
if (m_relative_rect.size() != rect.size()) {
auto event = make<GResizeEvent>(m_relative_rect.size(), rect.size());
GEventLoop::main().post_event(this, move(event));
}
bool size_changed = m_relative_rect.size() != rect.size();
m_relative_rect = rect;
if (size_changed) {
GResizeEvent resize_event(m_relative_rect.size(), rect.size());
event(resize_event);
}
update();
}