diff --git a/cmd/wm/client.c b/cmd/wm/client.c index 7a8e5100..5129118a 100644 --- a/cmd/wm/client.c +++ b/cmd/wm/client.c @@ -345,7 +345,8 @@ void detach_detached(Client *c) else { if (c->next) c->next->prev = c->prev; - c->prev->next = c->next; + if (c->prev) + c->prev->next = c->next; } ndetached--; } diff --git a/cmd/wm/layout_column.c b/cmd/wm/layout_column.c index 3fbb7413..e7f48572 100644 --- a/cmd/wm/layout_column.c +++ b/cmd/wm/layout_column.c @@ -269,7 +269,8 @@ static void detach_col(Area *a, Client *c, Bool unmap) { Acme *acme = a->aux; Frame *f = c->frame; - Column *col = f->aux; + Cell *cell = f->aux; + Column *col = cell->col; detach_client_from_frame(c, unmap); if (!f->clients) { diff --git a/cmd/wmiikeys.c b/cmd/wmiikeys.c index 30198487..bf906032 100644 --- a/cmd/wmiikeys.c +++ b/cmd/wmiikeys.c @@ -230,7 +230,7 @@ static void handle_shortcut_gkb(Window w, unsigned long mod, KeyCode key) if (!files[K_LOOKUP]->content) return; - for (s = shortcuts; s && ((s->mod != mod) && (s->key != key)); s = s->next); + for (s = shortcuts; s && ((s->mod != mod) || (s->key != key)); s = s->next); if (s && s->cmdfile && s->cmdfile->content) { wmii_spawn(dpy, s->cmdfile->content); return; @@ -244,7 +244,7 @@ static void handle_shortcut(Window w, unsigned long mod, KeyCode key) if (!files[K_LOOKUP]->content) return; - for (s = shortcuts; s && ((s->mod != mod) && (s->key != key)); s = s->next); + for (s = shortcuts; s && ((s->mod != mod) || (s->key != key)); s = s->next); if (s && s->cmdfile && s->cmdfile->content) { wmii_spawn(dpy, s->cmdfile->content); return; @@ -278,8 +278,7 @@ static void update() shortcuts = nil; if (grabkb) { - XGrabKeyboard(dpy, root, True, GrabModeAsync, - GrabModeAsync, CurrentTime); + XGrabKeyboard(dpy, root, True, GrabModeAsync, GrabModeAsync, CurrentTime); return; } /* create new shortcuts */