1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:38:11 +00:00

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.
This commit is contained in:
Andreas Kling 2019-04-22 01:15:47 +02:00
parent f9d3abf5d0
commit 9f122bff5a
12 changed files with 167 additions and 60 deletions

View file

@ -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()));
}