WindowServer: Make mod+f toggle focused window fullscreen state

This commit is contained in:
Bananymous 2024-11-15 20:45:56 +02:00
parent 1c08849667
commit c96aee5740
1 changed files with 9 additions and 0 deletions

View File

@ -352,6 +352,15 @@ void WindowServer::on_key_event(LibInput::KeyEvent event)
return; return;
} }
if (m_is_mod_key_held && event.pressed() && event.key == LibInput::Key::F)
{
if (!m_focused_window)
return;
m_is_fullscreen_window = !m_is_fullscreen_window;
invalidate(m_framebuffer.area());
return;
}
// Toggle window bounce with F2 // Toggle window bounce with F2
if (!m_is_fullscreen_window && event.pressed() && event.key == LibInput::Key::F2) if (!m_is_fullscreen_window && event.pressed() && event.key == LibInput::Key::F2)
m_is_bouncing_window = !m_is_bouncing_window; m_is_bouncing_window = !m_is_bouncing_window;