From e3dcf8ddf995bf533afe057db0f8059b1c58789f Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Tue, 4 Nov 2008 22:22:07 +0100 Subject: [PATCH] event: Remove unmapnotify handle --- src/client.c | 15 ++++++++------- src/event.c | 13 ------------- src/titlebar.c | 2 +- src/wmfs.c | 2 +- src/wmfs.h | 1 - wmfsrc | 2 +- 6 files changed, 11 insertions(+), 24 deletions(-) diff --git a/src/client.c b/src/client.c index 235084f..534d9fe 100644 --- a/src/client.c +++ b/src/client.c @@ -161,9 +161,10 @@ client_get(Window w) void client_hide(Client *c) { - XMoveWindow(dpy, c->win, c->geo.x + mw * 2, c->geo.y); - if(conf.titlebar.exist) - XMoveWindow(dpy, c->tbar->win, c->geo.x + mw * 2, c->geo.y); + //XMoveWindow(dpy, c->win, c->geo.x + mw * 2, c->geo.y); + //if(conf.titlebar.exist) + // XMoveWindow(dpy, c->tbar->win, c->geo.x + mw * 2, c->geo.y); + client_unmap(c); setwinstate(c->win, IconicState); return; @@ -432,9 +433,10 @@ uicb_client_raise(uicb_t cmd) void client_unhide(Client *c) { - XMoveWindow(dpy, c->win, c->geo.x, c->geo.y); - if(conf.titlebar.exist) - titlebar_update_position(c); + //XMoveWindow(dpy, c->win, c->geo.x, c->geo.y); + //if(conf.titlebar.exist) + // titlebar_update_position(c); + client_map(c); setwinstate(c->win, NormalState); return; @@ -461,7 +463,6 @@ client_unmanage(Client *c) if(conf.titlebar.exist) titlebar_delete(c); efree(c); - XSetErrorHandler(errorhandler); arrange(); return; diff --git a/src/event.c b/src/event.c index f15fe24..201503e 100644 --- a/src/event.c +++ b/src/event.c @@ -439,18 +439,6 @@ propertynotify(XEvent ev) return; } -/* UNMAPNOTIFY */ -void -unmapnotify(XEvent ev) -{ - Client *c; - - if((c = client_get(ev.xunmap.window))) - client_unmanage(c); - - return; -} - /* Handle */ void getevent(void) @@ -467,7 +455,6 @@ getevent(void) case MapRequest: maprequest(event); break; case MappingNotify: mapnotify(event); break; case PropertyNotify: propertynotify(event); break; - case UnmapNotify: unmapnotify(event); break; } return; diff --git a/src/titlebar.c b/src/titlebar.c index b4069a5..f47f277 100644 --- a/src/titlebar.c +++ b/src/titlebar.c @@ -131,7 +131,7 @@ titlebar_update(Client *c) bar_refresh_color(c->tbar); /* Draw the client title in the titlebar *logeek* */ - if(conf.titlebar.height > fonth) + if(conf.titlebar.height + 1 > fonth) { /* Set the text alignement */ switch(conf.titlebar.text_align) diff --git a/src/wmfs.c b/src/wmfs.c index 6533a05..4dbaf7f 100644 --- a/src/wmfs.c +++ b/src/wmfs.c @@ -184,7 +184,7 @@ init(void) grabkeys(); /* MISC WARNING */ - if(conf.titlebar.height - 1 < fonth) + if(conf.titlebar.height < fonth) fprintf(stderr, "WMFS Warning: Font too big, can't draw any text in the titlebar.\n"); return; diff --git a/src/wmfs.h b/src/wmfs.h index dd5fa86..8912338 100644 --- a/src/wmfs.h +++ b/src/wmfs.h @@ -117,7 +117,6 @@ void mouseaction(Client *c, int x, int y, int type); void uicb_mousemove(uicb_t cmd); void uicb_resizemouse(uicb_t cmd); void propertynotify(XEvent ev); -void unmapnotify(XEvent ev); void getevent(void); /* util.c */ diff --git a/wmfsrc b/wmfsrc index c2452bb..c003e36 100644 --- a/wmfsrc +++ b/wmfsrc @@ -77,7 +77,7 @@ client titlebar { position = "top" - height = 13 + height = 12 bg_normal = "#191919" bg_focus = "#191919" fg_normal = "#D4D4D4"