mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:48:11 +00:00
LibGfx+WindowServer: Ensure constrain-to-rect ends up inside the rect
This commit is contained in:
parent
4c2ad70066
commit
4b7639c3b5
2 changed files with 3 additions and 3 deletions
|
@ -421,7 +421,7 @@ void ScreenInput::on_receive_mouse_data(MousePacket const& packet)
|
|||
|
||||
auto* moved_to_screen = Screen::find_by_location(m_cursor_location);
|
||||
if (!moved_to_screen) {
|
||||
m_cursor_location = m_cursor_location.constrained(current_screen.rect());
|
||||
m_cursor_location.constrain(current_screen.rect());
|
||||
moved_to_screen = ¤t_screen;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue