diff options
author | Andreas Kling <kling@serenityos.org> | 2020-06-01 19:23:35 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-06-01 19:24:10 +0200 |
commit | 29029568ee5d52f67a639d93ed71bdc56033342b (patch) | |
tree | 17efcae62635231ea0f4ddeb943baab94a8dc75a /Services/WindowServer | |
parent | 8766e49a7c3a28f2851bcc84b5532e26b14f2db0 (diff) | |
download | serenity-29029568ee5d52f67a639d93ed71bdc56033342b.zip |
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.
Diffstat (limited to 'Services/WindowServer')
-rw-r--r-- | Services/WindowServer/MenuManager.h | 6 | ||||
-rw-r--r-- | Services/WindowServer/WindowManager.cpp | 18 | ||||
-rw-r--r-- | Services/WindowServer/WindowManager.h | 2 |
3 files changed, 0 insertions, 26 deletions
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>, 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; |