mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +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
Notes:
sideshowbarker
2024-07-19 01:27:28 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/ebaf20547c5
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…
Reference in a new issue