summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom <tomut@yahoo.com>2020-08-18 10:41:54 -0600
committerAndreas Kling <kling@serenityos.org>2020-08-18 19:50:33 +0200
commitc711d34276ca0caa37fbef5983ebbb6af1a5fc96 (patch)
treea053f8429ebd075cd107b97ef97ea79a38444cca
parent71e855474094c806ca099f1a8b61a07182ace90a (diff)
downloadserenity-c711d34276ca0caa37fbef5983ebbb6af1a5fc96.zip
WindowServer: Use same modal minimize/maximize logic with shortcuts
When minimizing/maximizing windows using the keyboard shortcuts we should use the same logic dealing with modal windows as the window frame buttons.
-rw-r--r--Services/WindowServer/WindowManager.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Services/WindowServer/WindowManager.cpp b/Services/WindowServer/WindowManager.cpp
index 77c921a1fa..777ff8ac08 100644
--- a/Services/WindowServer/WindowManager.cpp
+++ b/Services/WindowServer/WindowManager.cpp
@@ -1075,16 +1075,16 @@ void WindowManager::event(Core::Event& event)
if (key_event.type() == Event::KeyDown && key_event.modifiers() == Mod_Logo) {
if (key_event.key() == Key_Down) {
if (m_active_input_window->is_resizable() && m_active_input_window->is_maximized()) {
- m_active_input_window->set_maximized(false);
+ maximize_windows(*m_active_input_window, false);
return;
}
if (m_active_input_window->is_minimizable())
- m_active_input_window->set_minimized(true);
+ minimize_windows(*m_active_input_window, true);
return;
}
if (m_active_input_window->is_resizable()) {
if (key_event.key() == Key_Up) {
- m_active_input_window->set_maximized(!m_active_input_window->is_maximized());
+ maximize_windows(*m_active_input_window, !m_active_input_window->is_maximized());
return;
}
if (key_event.key() == Key_Left) {
@@ -1093,7 +1093,7 @@ void WindowManager::event(Core::Event& event)
return;
}
if (m_active_input_window->is_maximized())
- m_active_input_window->set_maximized(false);
+ maximize_windows(*m_active_input_window, false);
m_active_input_window->set_tiled(WindowTileType::Left);
return;
}
@@ -1103,7 +1103,7 @@ void WindowManager::event(Core::Event& event)
return;
}
if (m_active_input_window->is_maximized())
- m_active_input_window->set_maximized(false);
+ maximize_windows(*m_active_input_window, false);
m_active_input_window->set_tiled(WindowTileType::Right);
return;
}