diff --git a/src/client.c b/src/client.c index 161f22d..06ac009 100644 --- a/src/client.c +++ b/src/client.c @@ -758,7 +758,7 @@ client_manage(Window w, XWindowAttributes *wa, bool ar) tags[c->screen][c->tag].flags |= CleanFactFlag; cfactor_clean(c); - at.event_mask = PropertyChangeMask; + at.event_mask = EnterWindowMask | LeaveWindowMask | StructureNotifyMask | PropertyChangeMask; frame_create(c); client_size_hints(c); diff --git a/src/event.c b/src/event.c index 2a70e64..3197773 100644 --- a/src/event.c +++ b/src/event.c @@ -119,7 +119,7 @@ buttonpress(XEvent *e) if(ib->tags_board) { for(i = 1; i < conf.ntag[selscreen] + 1; ++i) - if(ev->window == ib->tags[i]->win) + if(ib->tags[i] && ev->window == ib->tags[i]->win) { do_mousebind(selscreen, ev->button, tags[selscreen][i].nmouse, tags[selscreen][i].mouse); diff --git a/src/wmfs.h b/src/wmfs.h index 72854bc..d7bdbf8 100644 --- a/src/wmfs.h +++ b/src/wmfs.h @@ -59,6 +59,7 @@ #include #include #include +#include #include /* Optional dependencies */