fix the ultimate bug when restarting awesome, client misdisplayed
This commit is contained in:
parent
1bb01589d5
commit
a8a814110c
8
client.c
8
client.c
|
@ -207,12 +207,10 @@ updatetitle(Client * c)
|
|||
void
|
||||
ban(Client * c)
|
||||
{
|
||||
if(c->isbanned)
|
||||
return;
|
||||
XUnmapWindow(c->display, c->win);
|
||||
setclientstate(c, IconicState);
|
||||
c->isbanned = True;
|
||||
c->unmapped++;
|
||||
c->unmapped = True;
|
||||
}
|
||||
|
||||
/** Configure client
|
||||
|
@ -550,11 +548,10 @@ saveprops(Client * c, int ntags)
|
|||
void
|
||||
unban(Client * c)
|
||||
{
|
||||
if(!c->isbanned)
|
||||
return;
|
||||
XMapWindow(c->display, c->win);
|
||||
setclientstate(c, NormalState);
|
||||
c->isbanned = False;
|
||||
c->unmapped = False;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -562,6 +559,7 @@ unmanage(Client * c, DC *drawcontext, long state, awesome_config *awesomeconf)
|
|||
{
|
||||
XWindowChanges wc;
|
||||
|
||||
c->unmapped = True;
|
||||
wc.border_width = c->oldborder;
|
||||
/* The server grab construct avoids race conditions. */
|
||||
XGrabServer(c->display);
|
||||
|
|
2
client.h
2
client.h
|
@ -38,7 +38,7 @@ struct Client
|
|||
int rx, ry, rw, rh;
|
||||
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
|
||||
int minax, maxax, minay, maxay;
|
||||
int unmapped;
|
||||
Bool unmapped;
|
||||
long flags;
|
||||
int border, oldborder;
|
||||
Bool isbanned, isfixed, ismax, isfloating, wasfloating;
|
||||
|
|
2
event.c
2
event.c
|
@ -429,7 +429,7 @@ handle_event_unmapnotify(XEvent * e, awesome_config *awesomeconf)
|
|||
XUnmapEvent *ev = &e->xunmap;
|
||||
|
||||
if((c = getclient(ev->window))
|
||||
&& ev->event == RootWindow(e->xany.display, c->screen) && (ev->send_event || !c->unmapped--))
|
||||
&& ev->event == RootWindow(e->xany.display, c->screen) && (ev->send_event || !c->unmapped))
|
||||
unmanage(c, &dc[c->screen], WithdrawnState, &awesomeconf[c->screen]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue