event: Fix unmapnotify (add thing in the if()) add check in hide / unhide

This commit is contained in:
Martin Duquesnoy 2008-11-22 15:23:58 +01:00
parent 11808514b4
commit 1d72b95a3b
4 changed files with 13 additions and 6 deletions

View File

@ -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);

View File

@ -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;
}

View File

@ -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 */

View File

@ -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,