mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:38:11 +00:00
WindowServer/LibGUI: Enforce minimum window size
This commit is contained in:
parent
71d6459b7f
commit
3474d7c88e
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