mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 01:51:03 +09:00
WindowServer/LibGUI: Enforce minimum window size
This commit is contained in:
parent
71d6459b7f
commit
3474d7c88e
Notes:
sideshowbarker
2024-07-19 07:29:26 +09:00
Author: https://github.com/linusg
Commit: 3474d7c88e
Pull-request: https://github.com/SerenityOS/serenity/pull/1845
Issue: https://github.com/SerenityOS/serenity/issues/1649
Issue: https://github.com/SerenityOS/serenity/issues/1843
3 changed files with 22 additions and 10 deletions
|
@ -167,13 +167,13 @@ void Window::set_rect(const Gfx::Rect& a_rect)
|
|||
m_main_widget->resize(m_rect_when_windowless.size());
|
||||
return;
|
||||
}
|
||||
WindowServerConnection::the().send_sync<Messages::WindowServer::SetWindowRect>(m_window_id, a_rect);
|
||||
if (m_back_bitmap && m_back_bitmap->size() != a_rect.size())
|
||||
auto window_rect = WindowServerConnection::the().send_sync<Messages::WindowServer::SetWindowRect>(m_window_id, a_rect)->rect();
|
||||
if (m_back_bitmap && m_back_bitmap->size() != window_rect.size())
|
||||
m_back_bitmap = nullptr;
|
||||
if (m_front_bitmap && m_front_bitmap->size() != a_rect.size())
|
||||
if (m_front_bitmap && m_front_bitmap->size() != window_rect.size())
|
||||
m_front_bitmap = nullptr;
|
||||
if (m_main_widget)
|
||||
m_main_widget->resize(a_rect.size());
|
||||
m_main_widget->resize(window_rect.size());
|
||||
}
|
||||
|
||||
void Window::set_window_type(WindowType window_type)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue