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:
parent
b860da3ea5
commit
8750f93201
Notes:
sideshowbarker
2024-07-19 14:12:51 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/8750f932014
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue