1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:37:46 +00:00

WindowServer: Don't let clients start resize of non-resizable windows

This came up in #6886. If resizing has been disabled for a window,
we shouldn't let clients bypass this via start_window_resize().
This commit is contained in:
Andreas Kling 2021-05-06 12:09:03 +02:00
parent dfd8598bf7
commit f3091d89aa

View file

@ -676,6 +676,10 @@ void ClientConnection::start_window_resize(i32 window_id)
return;
}
auto& window = *(*it).value;
if (!window.is_resizable()) {
dbgln("Client wants to start resizing a non-resizable window");
return;
}
// FIXME: We are cheating a bit here by using the current cursor location and hard-coding the left button.
// Maybe the client should be allowed to specify what initiated this request?
WindowManager::the().start_window_resize(window, Screen::the().cursor_location(), MouseButton::Left);