From f3091d89aa05792a5fa3949122278bbb046bc4d4 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 6 May 2021 12:09:03 +0200 Subject: 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(). --- Userland/Services/WindowServer/ClientConnection.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Userland/Services/WindowServer/ClientConnection.cpp') 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); -- cgit v1.2.3