From c1a26f0b358f9c381c0346d8d98c4bdce9c2f767 Mon Sep 17 00:00:00 2001 From: Sergey Bugaev Date: Mon, 25 May 2020 13:29:11 +0300 Subject: [PATCH] WindowServer: Don't crash when minimizing Eyes Or any other window that globally tracks the mouse cursor. --- Services/WindowServer/WindowManager.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Services/WindowServer/WindowManager.cpp b/Services/WindowServer/WindowManager.cpp index 7924d237ae..977f892d7d 100644 --- a/Services/WindowServer/WindowManager.cpp +++ b/Services/WindowServer/WindowManager.cpp @@ -761,10 +761,8 @@ void WindowManager::process_mouse_event(MouseEvent& event, Window*& hovered_wind HashTable 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);