1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:48:12 +00:00

WindowServer: Don't invalidate the cursor on left button state change.

This was needed back when pressing the left button would cause the cursor
to switch colors.
This commit is contained in:
Andreas Kling 2019-05-07 03:56:54 +02:00
parent b860da3ea5
commit 8750f93201

View file

@ -79,8 +79,8 @@ void WSScreen::on_receive_mouse_data(int dx, int dy, unsigned buttons)
auto message = make<WSMouseEvent>(WSEvent::MouseMove, m_cursor_location, buttons, MouseButton::None, m_modifiers);
WSEventLoop::the().post_event(WSWindowManager::the(), move(message));
}
// NOTE: Invalidate the cursor if it moved, or if the left button changed state (for the cursor color inversion.)
if (m_cursor_location != prev_location || changed_buttons & (unsigned)MouseButton::Left)
if (m_cursor_location != prev_location)
WSWindowManager::the().invalidate_cursor();
}