summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-02-01 11:23:54 +0100
committerAndreas Kling <kling@serenityos.org>2021-02-01 11:23:54 +0100
commita5bbe3280d2a492f861cccb641b1b35b8b667b61 (patch)
treee2118c7656edbb216e4b344e3d6a6d397bb46690 /Userland/Libraries
parentc41d340983b803c1c12a58ac7884b243906bda36 (diff)
downloadserenity-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.cpp2
-rw-r--r--Userland/Libraries/LibGUI/Window.cpp4
-rw-r--r--Userland/Libraries/LibGUI/Window.h2
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; }