Client/Event: Fix focus issue & client manual moving to next screen segfault

This commit is contained in:
Martin Duquesnoy 2011-10-27 19:06:54 +02:00
parent a3a2f33ddf
commit a7371e9445
3 changed files with 3 additions and 2 deletions

View File

@ -758,7 +758,7 @@ client_manage(Window w, XWindowAttributes *wa, bool ar)
tags[c->screen][c->tag].flags |= CleanFactFlag; tags[c->screen][c->tag].flags |= CleanFactFlag;
cfactor_clean(c); cfactor_clean(c);
at.event_mask = PropertyChangeMask; at.event_mask = EnterWindowMask | LeaveWindowMask | StructureNotifyMask | PropertyChangeMask;
frame_create(c); frame_create(c);
client_size_hints(c); client_size_hints(c);

View File

@ -119,7 +119,7 @@ buttonpress(XEvent *e)
if(ib->tags_board) if(ib->tags_board)
{ {
for(i = 1; i < conf.ntag[selscreen] + 1; ++i) 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); do_mousebind(selscreen, ev->button, tags[selscreen][i].nmouse, tags[selscreen][i].mouse);

View File

@ -59,6 +59,7 @@
#include <sys/time.h> #include <sys/time.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xatom.h> #include <X11/Xatom.h>
#include <X11/Xutil.h>
#include <X11/cursorfont.h> #include <X11/cursorfont.h>
/* Optional dependencies */ /* Optional dependencies */