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

Detect the "Logo" (Windows/Apple/whatever) key and use it for window resize.

This will be comfortable enough while I'm still developing with emulators.
QEMU keeps eating my "Alt" key presses and it's making things difficult.
This commit is contained in:
Andreas Kling 2019-03-03 12:56:48 +01:00
parent 159fa99539
commit 57fe316e01
7 changed files with 21 additions and 2 deletions

View file

@ -756,7 +756,7 @@ void WSWindowManager::process_mouse_event(WSMouseEvent& event, WSWindow*& event_
move_to_front(window);
set_active_window(&window);
}
if (event.type() == WSMessage::MouseDown && event.button() == MouseButton::Right) {
if (m_keyboard_modifiers == Mod_Logo && event.type() == WSMessage::MouseDown && event.button() == MouseButton::Right) {
start_window_resize(window, event);
return IterationDecision::Abort;
}
@ -984,6 +984,7 @@ void WSWindowManager::on_message(WSMessage& message)
if (message.is_key_event()) {
// FIXME: This is a good place to hook key events globally. :)
m_keyboard_modifiers = static_cast<WSKeyEvent&>(message).modifiers();
if (m_active_window)
return m_active_window->on_message(message);
return;