LibGUI: Verify m_window_id is not-zero in set_maximized

Window::set_maximized requires non-zero window id to be a valid call,
i.e. calling Window::show beforehand. A verify statement before the
server call can help developers by hinting correct usage.
This commit is contained in:
Aziz Berkay Yesilyurt 2021-07-06 21:38:07 +02:00 committed by Ali Mohammad Pur
parent 0459a111b2
commit 6f594b36f5
Notes: sideshowbarker 2024-07-18 10:01:50 +09:00

View file

@ -948,6 +948,7 @@ bool Window::is_maximized() const
void Window::set_maximized(bool maximized)
{
VERIFY(m_window_id != 0);
WindowServerConnection::the().async_set_maximized(m_window_id, maximized);
}