X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fsighandler.c;h=92cbc5cb3abb7e7bfdc5abba914d83ccb4276cbb;hb=6a1c34d2c584271d26f4dcc214798421c097a1ac;hp=8330232ab55f289da8c26afb5bb81f319c31ae39;hpb=818e02ef3545b000e104b79cf52610ac0f1765cd;p=i3%2Fi3 diff --git a/src/sighandler.c b/src/sighandler.c index 8330232a..92cbc5cb 100644 --- a/src/sighandler.c +++ b/src/sighandler.c @@ -83,7 +83,14 @@ static int sig_draw_window(xcb_connection_t *conn, xcb_window_t win, int width, * */ static int sig_handle_key_press(void *ignored, xcb_connection_t *conn, xcb_key_press_event_t *event) { - xcb_keysym_t sym = xcb_key_press_lookup_keysym(keysyms, event, event->state); + uint16_t state = event->state; + + /* Apparantly, after activating numlock once, the numlock modifier + * stays turned on (use xev(1) to verify). So, to resolve useful + * keysyms, we remove the numlock flag from the event state */ + state &= ~xcb_numlock_mask; + + xcb_keysym_t sym = xcb_key_press_lookup_keysym(keysyms, event, state); if (sym == 'e') { DLOG("User issued exit-command, raising error again.\n"); @@ -173,6 +180,8 @@ void handle_signal(int sig, siginfo_t *info, void *data) { Output *screen; xcb_window_t win; TAILQ_FOREACH(screen, &outputs, outputs) { + if (!screen->active) + continue; win = open_input_window(conn, screen->rect, width, height); /* Create pixmap */