event: Fix unmapnotify (add thing in the if()) add check in hide / unhide
This commit is contained in:
parent
11808514b4
commit
1d72b95a3b
@ -268,6 +268,8 @@ client_get_name(Client *c)
|
||||
void
|
||||
client_hide(Client *c)
|
||||
{
|
||||
CHECK(!c->hide);
|
||||
|
||||
client_unmap(c);
|
||||
c->hide = True;
|
||||
setwinstate(c->win, IconicState);
|
||||
@ -580,6 +582,8 @@ uicb_client_raise(uicb_t cmd)
|
||||
void
|
||||
client_unhide(Client *c)
|
||||
{
|
||||
CHECK(c->hide);
|
||||
|
||||
client_map(c);
|
||||
c->hide = False;
|
||||
setwinstate(c->win, NormalState);
|
||||
|
||||
@ -350,8 +350,12 @@ unmapnotify(XUnmapEvent *ev)
|
||||
Client *c;
|
||||
|
||||
if((c = client_gb_win(ev->window))
|
||||
&& ev->send_event)
|
||||
&& ev->send_event
|
||||
&& !c->hide)
|
||||
{
|
||||
client_unmanage(c);
|
||||
XSetErrorHandler(errorhandler);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -80,7 +80,8 @@ frame_create(Client *c)
|
||||
c->frame_geo.height - RESHW,
|
||||
RESHW,
|
||||
RESHW, 0,
|
||||
CWEventMask|CWBackPixel|CWCursor, c->colors.resizecorner, &at);
|
||||
CWEventMask|CWBackPixel|CWCursor,
|
||||
c->colors.resizecorner, &at);
|
||||
|
||||
/* Border (for shadow) */
|
||||
CWIN(c->left, c->frame, 0, 0, SHADH, c->frame_geo.height, 0,
|
||||
@ -127,7 +128,7 @@ frame_moveresize(Client *c, XRectangle geo)
|
||||
{
|
||||
c->frame_geo.x = (geo.x) ? geo.x - BORDH : c->frame_geo.x;
|
||||
c->frame_geo.y = (geo.y) ? geo.y - TBARH : c->frame_geo.y;
|
||||
c->frame_geo.width = (geo.width) ? FRAMEW(geo.width) : c->frame_geo.width;
|
||||
c->frame_geo.width = (geo.width) ? FRAMEW(geo.width) : c->frame_geo.width;
|
||||
c->frame_geo.height = (geo.height) ? FRAMEH(geo.height) : c->frame_geo.height;
|
||||
|
||||
/* Frame */
|
||||
|
||||
@ -50,10 +50,8 @@ 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