Fix crash reported by Andrey.
Make focus-follows-mouse easier to find for those who want it (cough, Ron Minnich, cough).
This commit is contained in:
parent
b5b71ffbae
commit
d52fb463ee
4 changed files with 25 additions and 8 deletions
|
|
@ -282,6 +282,7 @@ newwindow(XCreateWindowEvent *e)
|
|||
void
|
||||
destroy(Window w)
|
||||
{
|
||||
int i;
|
||||
Client *c;
|
||||
|
||||
curtime = CurrentTime;
|
||||
|
|
@ -289,6 +290,11 @@ destroy(Window w)
|
|||
if(c == 0)
|
||||
return;
|
||||
|
||||
if(numvirtuals > 1)
|
||||
for(i=0; i<numvirtuals; i++)
|
||||
if(currents[i] == c)
|
||||
currents[i] = 0;
|
||||
|
||||
rmclient(c);
|
||||
|
||||
/* flush any errors generated by the window's sudden demise */
|
||||
|
|
@ -470,12 +476,14 @@ enter(XCrossingEvent *e)
|
|||
Client *c;
|
||||
|
||||
curtime = e->time;
|
||||
if(!ffm)
|
||||
if(e->mode != NotifyGrab || e->detail != NotifyNonlinearVirtual)
|
||||
return;
|
||||
c = getclient(e->window, 0);
|
||||
if(c != 0 && c != current){
|
||||
/* someone grabbed the pointer; make them current */
|
||||
XMapRaised(dpy, c->parent);
|
||||
if(!ffm)
|
||||
XMapRaised(dpy, c->parent);
|
||||
top(c);
|
||||
active(c);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue