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:
@@ -1355,8 +1355,8 @@ BAN::RefPtr<Window> WindowServer::find_window_with_fd(int fd) const
|
||||
|
||||
BAN::RefPtr<Window> WindowServer::find_hovered_window() const
|
||||
{
|
||||
for (auto window : m_client_windows)
|
||||
if (window->full_area().contains(m_cursor))
|
||||
for (size_t i = m_client_windows.size(); i > 0; i--)
|
||||
if (auto window = m_client_windows[i - 1]; window->client_area().contains(m_cursor))
|
||||
return window;
|
||||
return {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user