From cc85ffd8a1c4703051655c7f5727157e7e1ce96a Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 18 Nov 2020 13:09:09 +0100 Subject: Fixed unrecognized special keys --- apps/wm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/wm.c b/apps/wm.c index 05d497c..544fb66 100644 --- a/apps/wm.c +++ b/apps/wm.c @@ -101,7 +101,7 @@ static void redraw_all() static u32 special_keys_pressed; static void handle_keyboard(struct event_keyboard *event) { - if (event->magic != KEYBOARD_MAGIC || !focused) + if (event->magic != KEYBOARD_MAGIC) return; if (event->scancode == KEY_LEFTSHIFT || event->scancode == KEY_RIGHTSHIFT) @@ -111,6 +111,9 @@ static void handle_keyboard(struct event_keyboard *event) else if (event->scancode == KEY_LEFTCTRL || event->scancode == KEY_RIGHTCTRL) special_keys_pressed ^= CTRL_PRESSED; + if (!focused) + return; + struct gui_event_keyboard *msg = malloc(sizeof(*msg)); if (special_keys_pressed & SHIFT_PRESSED) -- cgit v1.2.3