WindowServer: Close any open menus when starting window move/resize

This commit is contained in:
Andreas Kling 2021-05-03 23:12:33 +02:00
parent 396ff6401f
commit 1ee31981da
Notes: sideshowbarker 2024-07-18 18:44:09 +09:00

View file

@ -471,6 +471,8 @@ bool WindowManager::pick_new_active_window(Window* previous_active)
void WindowManager::start_window_move(Window& window, const MouseEvent& event)
{
MenuManager::the().close_everyone();
dbgln_if(MOVE_DEBUG, "[WM] Begin moving Window({})", &window);
move_to_front_and_make_active(window);
@ -483,6 +485,8 @@ void WindowManager::start_window_move(Window& window, const MouseEvent& event)
void WindowManager::start_window_resize(Window& window, const Gfx::IntPoint& position, MouseButton button)
{
MenuManager::the().close_everyone();
move_to_front_and_make_active(window);
constexpr ResizeDirection direction_for_hot_area[3][3] = {
{ ResizeDirection::UpLeft, ResizeDirection::Up, ResizeDirection::UpRight },