summaryrefslogtreecommitdiff
path: root/Servers/WindowServer/WSWindowFrame.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-04-22 01:15:47 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-04-22 01:15:47 +0200
commit9f122bff5a2082df40b8e7c839df86f07fbebda6 (patch)
tree00b10c2b6f29660108a5afa76a1f3c0409ce2323 /Servers/WindowServer/WSWindowFrame.cpp
parentf9d3abf5d041f574304d2e585c5cf51448a77063 (diff)
downloadserenity-9f122bff5a2082df40b8e7c839df86f07fbebda6.zip
WindowServer+LibGUI: Allow arbitrary number of rects in messages.
To get truly atomic updates, add a mechanism for passing arbitrary amounts of extra data along with WindowServer messages. This allows us to pass all the rects in a single message.
Diffstat (limited to 'Servers/WindowServer/WSWindowFrame.cpp')
-rw-r--r--Servers/WindowServer/WSWindowFrame.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Servers/WindowServer/WSWindowFrame.cpp b/Servers/WindowServer/WSWindowFrame.cpp
index 98d97fdde1..3b1d304cdb 100644
--- a/Servers/WindowServer/WSWindowFrame.cpp
+++ b/Servers/WindowServer/WSWindowFrame.cpp
@@ -239,7 +239,7 @@ void WSWindowFrame::on_mouse_event(const WSMouseEvent& event)
return;
}
- if (event.type() == WSEvent::MouseMove && event.buttons() == 0) {
+ if (m_window.is_resizable() && event.type() == WSEvent::MouseMove && event.buttons() == 0) {
constexpr ResizeDirection direction_for_hot_area[3][3] = {
{ ResizeDirection::UpLeft, ResizeDirection::Up, ResizeDirection::UpRight },
{ ResizeDirection::Left, ResizeDirection::None, ResizeDirection::Right },
@@ -256,6 +256,6 @@ void WSWindowFrame::on_mouse_event(const WSMouseEvent& event)
return;
}
- if (event.button() == MouseButton::Left)
+ if (m_window.is_resizable() && event.button() == MouseButton::Left)
wm.start_window_resize(m_window, event.translated(rect().location()));
}