瀏覽代碼

WindowServer: Clear the current resize candidate when in menus

While the menu system is swallowing mouse events, just clear any resize
candidate we had set. This ensures that we don't end up with a resize
cursor when slipping into a menu-controlled part of the screen.

Fixes #1306.
Andreas Kling 5 年之前
父節點
當前提交
fbe9aad70a
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      Servers/WindowServer/WindowManager.cpp

+ 1 - 0
Servers/WindowServer/WindowManager.cpp

@@ -767,6 +767,7 @@ void WindowManager::process_mouse_event(MouseEvent& event, Window*& hovered_wind
 
 
     // FIXME: Now that the menubar has a dedicated window, is this special-casing really necessary?
     // FIXME: Now that the menubar has a dedicated window, is this special-casing really necessary?
     if (MenuManager::the().has_open_menu() || (!active_window_is_modal() && menubar_rect().contains(event.position()))) {
     if (MenuManager::the().has_open_menu() || (!active_window_is_modal() && menubar_rect().contains(event.position()))) {
+        clear_resize_candidate();
         MenuManager::the().dispatch_event(event);
         MenuManager::the().dispatch_event(event);
         return;
         return;
     }
     }