diff options
Diffstat (limited to 'apps/wm.c')
-rw-r--r-- | apps/wm.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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) |