mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-02 09:18:52 +00:00
LibGUI: GWindow should only discard the backing store on actual resize.
This commit is contained in:
parent
7c18b86781
commit
6e70ba7d1d
Notes:
sideshowbarker
2024-07-19 15:36:39 +09:00
Author: https://github.com/awesomekling
Commit: 6e70ba7d1d
1 changed files with 5 additions and 3 deletions
|
@ -234,10 +234,12 @@ void GWindow::event(GEvent& event)
|
|||
}
|
||||
|
||||
if (event.type() == GEvent::Resize) {
|
||||
m_backing = nullptr;
|
||||
auto new_size = static_cast<GResizeEvent&>(event).size();
|
||||
if (m_backing && m_backing->size() != new_size)
|
||||
m_backing = nullptr;
|
||||
m_pending_paint_event_rects.clear();
|
||||
m_rect_when_windowless = { { }, static_cast<GResizeEvent&>(event).size() };
|
||||
m_main_widget->set_relative_rect({ { }, static_cast<GResizeEvent&>(event).size() });
|
||||
m_rect_when_windowless = { { }, new_size };
|
||||
m_main_widget->set_relative_rect({ { }, new_size });
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue