mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 15:49:11 +00:00
WindowServer: Don't crash when minimizing Eyes
Or any other window that globally tracks the mouse cursor.
This commit is contained in:
parent
431bbde6df
commit
c1a26f0b35
Notes:
sideshowbarker
2024-07-19 06:09:33 +09:00
Author: https://github.com/bugaevc
Commit: c1a26f0b35
Pull-request: https://github.com/SerenityOS/serenity/pull/2369
Reviewed-by: https://github.com/awesomekling
1 changed files with 1 additions and 3 deletions
|
@ -761,10 +761,8 @@ void WindowManager::process_mouse_event(MouseEvent& event, Window*& hovered_wind
|
|||
HashTable<Window*> windows_who_received_mouse_event_due_to_cursor_tracking;
|
||||
|
||||
for (auto* window = m_windows_in_order.tail(); window; window = window->prev()) {
|
||||
if (!window->global_cursor_tracking())
|
||||
if (!window->global_cursor_tracking() || !window->is_visible() || window->is_minimized())
|
||||
continue;
|
||||
ASSERT(window->is_visible()); // Maybe this should be supported? Idk. Let's catch it and think about it later.
|
||||
ASSERT(!window->is_minimized()); // Maybe this should also be supported? Idk.
|
||||
windows_who_received_mouse_event_due_to_cursor_tracking.set(window);
|
||||
auto translated_event = event.translated(-window->position());
|
||||
deliver_mouse_event(*window, translated_event);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue