From 4b7639c3b51b142bf6f2bff52097064387c3ed1a Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Sat, 6 May 2023 20:54:38 +0200 Subject: LibGfx+WindowServer: Ensure constrain-to-rect ends up inside the rect --- Userland/Services/WindowServer/Screen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Userland/Services/WindowServer') diff --git a/Userland/Services/WindowServer/Screen.cpp b/Userland/Services/WindowServer/Screen.cpp index 4b95c9fa3d..2ce1ea4337 100644 --- a/Userland/Services/WindowServer/Screen.cpp +++ b/Userland/Services/WindowServer/Screen.cpp @@ -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; } -- cgit v1.2.3