mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 12:15:07 +00:00
WindowServer: Store the mouse button state in one variable.
This makes the logic around it a lot less verbose.
This commit is contained in:
parent
26a9d662f4
commit
f3ff402cf3
4 changed files with 25 additions and 51 deletions
|
@ -958,7 +958,7 @@ void WSWindowManager::draw_cursor()
|
|||
Rect cursor_rect { cursor_location.x(), cursor_location.y(), (int)m_cursor_bitmap_inner->width(), (int)m_cursor_bitmap_inner->height() };
|
||||
Color inner_color = Color::White;
|
||||
Color outer_color = Color::Black;
|
||||
if (m_screen.left_mouse_button_pressed())
|
||||
if (m_screen.mouse_button_state() & (unsigned)MouseButton::Left)
|
||||
swap(inner_color, outer_color);
|
||||
m_back_painter->draw_bitmap(cursor_location, *m_cursor_bitmap_inner, inner_color);
|
||||
m_back_painter->draw_bitmap(cursor_location, *m_cursor_bitmap_outer, outer_color);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue