mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-22 23:55:12 +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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user