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
Notes: sideshowbarker 2024-07-19 14:12:51 +09:00

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