1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:28:12 +00:00

WindowManager: Restore a window's geometry when untiling it

Specifically, when untiling it using the Super-{Left,Right} shortcuts

Fixes #5182
This commit is contained in:
etaIneLp 2021-01-30 13:57:27 -05:00 committed by Andreas Kling
parent c0e88b9710
commit e625ae1130
3 changed files with 15 additions and 7 deletions

View file

@ -1133,8 +1133,10 @@ void WindowManager::event(Core::Event& event)
return;
}
if (key_event.key() == Key_Left) {
if (m_active_input_window->tiled() == WindowTileType::Left)
return;
if (m_active_input_window->tiled() != WindowTileType::None) {
m_active_input_window->set_tiled(WindowTileType::None);
m_active_input_window->set_untiled();
return;
}
if (m_active_input_window->is_maximized())
@ -1143,8 +1145,10 @@ void WindowManager::event(Core::Event& event)
return;
}
if (key_event.key() == Key_Right) {
if (m_active_input_window->tiled() == WindowTileType::Right)
return;
if (m_active_input_window->tiled() != WindowTileType::None) {
m_active_input_window->set_tiled(WindowTileType::None);
m_active_input_window->set_untiled();
return;
}
if (m_active_input_window->is_maximized())