From 29029568ee5d52f67a639d93ed71bdc56033342b Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 1 Jun 2020 19:23:35 +0200 Subject: WindowServer: Remove keyboard shortcut for toggling the system menu 100% of the time I activated this shortcut, I did not want to activate this shortcut. --- Services/WindowServer/MenuManager.h | 6 ------ Services/WindowServer/WindowManager.cpp | 18 ------------------ Services/WindowServer/WindowManager.h | 2 -- 3 files changed, 26 deletions(-) (limited to 'Services/WindowServer') diff --git a/Services/WindowServer/MenuManager.h b/Services/WindowServer/MenuManager.h index f314b75d70..f24292e3b0 100644 --- a/Services/WindowServer/MenuManager.h +++ b/Services/WindowServer/MenuManager.h @@ -70,12 +70,6 @@ public: void close_all_menus_from_client(Badge, ClientConnection&); - void toggle_system_menu() - { - if (m_system_menu) - toggle_menu(*m_system_menu); - } - Menu* system_menu() { return m_system_menu; } void set_system_menu(Menu&); diff --git a/Services/WindowServer/WindowManager.cpp b/Services/WindowServer/WindowManager.cpp index 5d900fd930..bd84dbbdd5 100644 --- a/Services/WindowServer/WindowManager.cpp +++ b/Services/WindowServer/WindowManager.cpp @@ -816,13 +816,11 @@ void WindowManager::process_mouse_event(MouseEvent& event, Window*& hovered_wind if (!window.is_fullscreen() && m_keyboard_modifiers == Mod_Logo && event.type() == Event::MouseDown && event.button() == MouseButton::Left) { hovered_window = &window; start_window_move(window, event); - m_moved_or_resized_since_logo_keydown = true; return; } if (window.is_resizable() && m_keyboard_modifiers == Mod_Logo && event.type() == Event::MouseDown && event.button() == MouseButton::Right && !window.is_blocked_by_modal_window()) { hovered_window = &window; start_window_resize(window, event); - m_moved_or_resized_since_logo_keydown = true; return; } } @@ -930,18 +928,6 @@ void WindowManager::event(Core::Event& event) return; } - if (key_event.key() == Key_Logo) { - if (key_event.type() == Event::KeyUp) { - if (!m_moved_or_resized_since_logo_keydown && !m_switcher.is_visible() && !m_move_window && !m_resize_window) { - MenuManager::the().toggle_system_menu(); - return; - } - - } else if (key_event.type() == Event::KeyDown) { - m_moved_or_resized_since_logo_keydown = false; - } - } - if (MenuManager::the().current_menu()) { MenuManager::the().dispatch_event(event); return; @@ -957,7 +943,6 @@ void WindowManager::event(Core::Event& event) if (m_active_window) { if (key_event.type() == Event::KeyDown && key_event.modifiers() == Mod_Logo) { if (key_event.key() == Key_Down) { - m_moved_or_resized_since_logo_keydown = true; if (m_active_window->is_resizable() && m_active_window->is_maximized()) { m_active_window->set_maximized(false); return; @@ -968,12 +953,10 @@ void WindowManager::event(Core::Event& event) } if (m_active_window->is_resizable()) { if (key_event.key() == Key_Up) { - m_moved_or_resized_since_logo_keydown = true; m_active_window->set_maximized(!m_active_window->is_maximized()); return; } if (key_event.key() == Key_Left) { - m_moved_or_resized_since_logo_keydown = true; if (m_active_window->tiled() != WindowTileType::None) { m_active_window->set_tiled(WindowTileType::None); return; @@ -984,7 +967,6 @@ void WindowManager::event(Core::Event& event) return; } if (key_event.key() == Key_Right) { - m_moved_or_resized_since_logo_keydown = true; if (m_active_window->tiled() != WindowTileType::None) { m_active_window->set_tiled(WindowTileType::None); return; diff --git a/Services/WindowServer/WindowManager.h b/Services/WindowServer/WindowManager.h index 14688e0a26..3ccb440dda 100644 --- a/Services/WindowServer/WindowManager.h +++ b/Services/WindowServer/WindowManager.h @@ -259,8 +259,6 @@ private: Gfx::Point m_resize_origin; ResizeDirection m_resize_direction { ResizeDirection::None }; - bool m_moved_or_resized_since_logo_keydown { false }; - u8 m_keyboard_modifiers { 0 }; WindowSwitcher m_switcher; -- cgit v1.2.3