event: Add unmapwithevent in Client structure for specify the unmap reason of the client and manage it
This commit is contained in:
parent
cda95f3dcc
commit
4ff699dcd6
@ -270,6 +270,8 @@ client_get_name(Client *c)
|
||||
void
|
||||
client_hide(Client *c)
|
||||
{
|
||||
CHECK(!c->unmapwithevent);
|
||||
|
||||
client_unmap(c);
|
||||
c->hide = True;
|
||||
setwinstate(c->win, IconicState);
|
||||
@ -582,6 +584,8 @@ uicb_client_raise(uicb_t cmd)
|
||||
void
|
||||
client_unhide(Client *c)
|
||||
{
|
||||
CHECK(!c->unmapwithevent);
|
||||
|
||||
client_map(c);
|
||||
c->hide = False;
|
||||
setwinstate(c->win, NormalState);
|
||||
|
||||
@ -308,7 +308,10 @@ maprequest(XMapRequestEvent *ev)
|
||||
* with the unmap event
|
||||
*/
|
||||
if(c->unmapped)
|
||||
{
|
||||
client_map(c);
|
||||
c->unmapwithevent = False;
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
@ -357,7 +360,10 @@ unmapnotify(XUnmapEvent *ev)
|
||||
|
||||
if((c = client_gb_win(ev->window))
|
||||
&& ev->send_event)
|
||||
{
|
||||
client_unmap(c);
|
||||
c->unmapwithevent = True;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ struct Client
|
||||
} colors;
|
||||
/* Client Layout Information */
|
||||
Bool max, tile, free, hide;
|
||||
Bool hint, lmax, unmapped;
|
||||
Bool hint, lmax, unmapped, unmapwithevent;
|
||||
/* Struct in chains */
|
||||
Client *next;
|
||||
Client *prev;
|
||||
|
||||
@ -50,7 +50,10 @@ errorhandler(Display *d, XErrorEvent *event)
|
||||
if((c = client_gb_win(event->resourceid))
|
||||
&& c->unmapped
|
||||
&& event->request_code == 42)
|
||||
{
|
||||
//client_kill(c);
|
||||
return 0;
|
||||
}
|
||||
|
||||
XGetErrorText(d, event->error_code, mess, 128);
|
||||
fprintf(stderr, "WMFS error: %s(%d) opcodes %d/%d\n resource #%lx\n", mess,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user