mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:47:45 +00:00
WindowServer: Show modal window's cursor over blocked windows
When a window is blocked by a modal window from the same application, we now prefer the modal window's cursor instead of the hovered window.
This commit is contained in:
parent
75f61fe3d9
commit
ebaf20547c
1 changed files with 8 additions and 2 deletions
|
@ -1306,8 +1306,14 @@ const Cursor& WindowManager::active_cursor() const
|
|||
}
|
||||
}
|
||||
|
||||
if (m_hovered_window && m_hovered_window->cursor())
|
||||
return *m_hovered_window->cursor();
|
||||
if (m_hovered_window) {
|
||||
if (auto* modal_window = const_cast<Window&>(*m_hovered_window).is_blocked_by_modal_window()) {
|
||||
if (modal_window->cursor())
|
||||
return *modal_window->cursor();
|
||||
} else if (m_hovered_window->cursor()) {
|
||||
return *m_hovered_window->cursor();
|
||||
}
|
||||
}
|
||||
|
||||
return *m_arrow_cursor;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue