summaryrefslogtreecommitdiff
path: root/Userland/Services/WindowServer/ClientConnection.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-05-06 12:09:03 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-06 12:09:03 +0200
commitf3091d89aa05792a5fa3949122278bbb046bc4d4 (patch)
tree58afeab1ff13182344d72e2997ed4b7e0f1d25e0 /Userland/Services/WindowServer/ClientConnection.cpp
parentdfd8598bf7fdd0fe7cd178d6ef3658320a55499d (diff)
downloadserenity-f3091d89aa05792a5fa3949122278bbb046bc4d4.zip
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().
Diffstat (limited to 'Userland/Services/WindowServer/ClientConnection.cpp')
-rw-r--r--Userland/Services/WindowServer/ClientConnection.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Services/WindowServer/ClientConnection.cpp b/Userland/Services/WindowServer/ClientConnection.cpp
index 1878fe088b..2cfee30ac2 100644
--- a/Userland/Services/WindowServer/ClientConnection.cpp
+++ b/Userland/Services/WindowServer/ClientConnection.cpp
@@ -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);