diff options
author | Andreas Kling <kling@serenityos.org> | 2021-02-01 11:23:54 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-01 11:23:54 +0100 |
commit | a5bbe3280d2a492f861cccb641b1b35b8b667b61 (patch) | |
tree | e2118c7656edbb216e4b344e3d6a6d397bb46690 /Userland/Libraries | |
parent | c41d340983b803c1c12a58ac7884b243906bda36 (diff) | |
download | serenity-a5bbe3280d2a492f861cccb641b1b35b8b667b61.zip |
LibGUI+WindowServer: Don't use a WM IPC to initiate own window resize
The WM_* IPC messages are intended for "outsider" window management,
not for a client's own windows. Make a separate StartWindowResize
message for this.
This was the only reason that every IPC client had to know its server
side client ID.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibGUI/ResizeCorner.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibGUI/Window.cpp | 4 | ||||
-rw-r--r-- | Userland/Libraries/LibGUI/Window.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibGUI/ResizeCorner.cpp b/Userland/Libraries/LibGUI/ResizeCorner.cpp index b1b2f5e1d0..5e7f18bd6f 100644 --- a/Userland/Libraries/LibGUI/ResizeCorner.cpp +++ b/Userland/Libraries/LibGUI/ResizeCorner.cpp @@ -106,7 +106,7 @@ void ResizeCorner::paint_event(PaintEvent& event) void ResizeCorner::mousedown_event(MouseEvent& event) { if (event.button() == MouseButton::Left) - window()->start_wm_resize(); + window()->start_interactive_resize(); Widget::mousedown_event(event); } diff --git a/Userland/Libraries/LibGUI/Window.cpp b/Userland/Libraries/LibGUI/Window.cpp index c2e684c237..1dc2d8ce7a 100644 --- a/Userland/Libraries/LibGUI/Window.cpp +++ b/Userland/Libraries/LibGUI/Window.cpp @@ -774,9 +774,9 @@ void Window::apply_icon() WindowServerConnection::the().send_sync<Messages::WindowServer::SetWindowIconBitmap>(m_window_id, m_icon->to_shareable_bitmap()); } -void Window::start_wm_resize() +void Window::start_interactive_resize() { - WindowServerConnection::the().post_message(Messages::WindowServer::WM_StartWindowResize(WindowServerConnection::the().my_client_id(), m_window_id)); + WindowServerConnection::the().post_message(Messages::WindowServer::StartWindowResize(m_window_id)); } Vector<Widget*> Window::focusable_widgets(FocusSource source) const diff --git a/Userland/Libraries/LibGUI/Window.h b/Userland/Libraries/LibGUI/Window.h index 3e734d2e56..7ee73ea752 100644 --- a/Userland/Libraries/LibGUI/Window.h +++ b/Userland/Libraries/LibGUI/Window.h @@ -126,7 +126,7 @@ public: virtual void close(); void move_to_front(); - void start_wm_resize(); + void start_interactive_resize(); Widget* main_widget() { return m_main_widget; } const Widget* main_widget() const { return m_main_widget; } |