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