WindowServer: Fix custom cursors

Custom cursor is now only set if the cursor is in the client area
instead of anyehere in the window. This makes hidden cursor visible
when it is on top of the title bar!
This commit is contained in:
Bananymous 2025-08-03 15:37:04 +03:00
parent 8ea32c7650
commit 4519c48284
1 changed files with 2 additions and 2 deletions

View File

@ -1355,8 +1355,8 @@ BAN::RefPtr<Window> WindowServer::find_window_with_fd(int fd) const
BAN::RefPtr<Window> WindowServer::find_hovered_window() const BAN::RefPtr<Window> WindowServer::find_hovered_window() const
{ {
for (auto window : m_client_windows) for (size_t i = m_client_windows.size(); i > 0; i--)
if (window->full_area().contains(m_cursor)) if (auto window = m_client_windows[i - 1]; window->client_area().contains(m_cursor))
return window; return window;
return {}; return {};
} }