event: Remove unmapnotify handle

This commit is contained in:
Martin Duquesnoy 2008-11-04 22:22:07 +01:00
parent d2255a2581
commit e3dcf8ddf9
6 changed files with 11 additions and 24 deletions

View File

@ -161,9 +161,10 @@ client_get(Window w)
void void
client_hide(Client *c) client_hide(Client *c)
{ {
XMoveWindow(dpy, c->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) //if(conf.titlebar.exist)
XMoveWindow(dpy, c->tbar->win, c->geo.x + mw * 2, c->geo.y); // XMoveWindow(dpy, c->tbar->win, c->geo.x + mw * 2, c->geo.y);
client_unmap(c);
setwinstate(c->win, IconicState); setwinstate(c->win, IconicState);
return; return;
@ -432,9 +433,10 @@ uicb_client_raise(uicb_t cmd)
void void
client_unhide(Client *c) client_unhide(Client *c)
{ {
XMoveWindow(dpy, c->win, c->geo.x, c->geo.y); //XMoveWindow(dpy, c->win, c->geo.x, c->geo.y);
if(conf.titlebar.exist) //if(conf.titlebar.exist)
titlebar_update_position(c); // titlebar_update_position(c);
client_map(c);
setwinstate(c->win, NormalState); setwinstate(c->win, NormalState);
return; return;
@ -461,7 +463,6 @@ client_unmanage(Client *c)
if(conf.titlebar.exist) if(conf.titlebar.exist)
titlebar_delete(c); titlebar_delete(c);
efree(c); efree(c);
XSetErrorHandler(errorhandler);
arrange(); arrange();
return; return;

View File

@ -439,18 +439,6 @@ propertynotify(XEvent ev)
return; return;
} }
/* UNMAPNOTIFY */
void
unmapnotify(XEvent ev)
{
Client *c;
if((c = client_get(ev.xunmap.window)))
client_unmanage(c);
return;
}
/* Handle */ /* Handle */
void void
getevent(void) getevent(void)
@ -467,7 +455,6 @@ getevent(void)
case MapRequest: maprequest(event); break; case MapRequest: maprequest(event); break;
case MappingNotify: mapnotify(event); break; case MappingNotify: mapnotify(event); break;
case PropertyNotify: propertynotify(event); break; case PropertyNotify: propertynotify(event); break;
case UnmapNotify: unmapnotify(event); break;
} }
return; return;

View File

@ -131,7 +131,7 @@ titlebar_update(Client *c)
bar_refresh_color(c->tbar); bar_refresh_color(c->tbar);
/* Draw the client title in the titlebar *logeek* */ /* Draw the client title in the titlebar *logeek* */
if(conf.titlebar.height > fonth) if(conf.titlebar.height + 1 > fonth)
{ {
/* Set the text alignement */ /* Set the text alignement */
switch(conf.titlebar.text_align) switch(conf.titlebar.text_align)

View File

@ -184,7 +184,7 @@ init(void)
grabkeys(); grabkeys();
/* MISC WARNING */ /* 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"); fprintf(stderr, "WMFS Warning: Font too big, can't draw any text in the titlebar.\n");
return; return;

View File

@ -117,7 +117,6 @@ void mouseaction(Client *c, int x, int y, int type);
void uicb_mousemove(uicb_t cmd); void uicb_mousemove(uicb_t cmd);
void uicb_resizemouse(uicb_t cmd); void uicb_resizemouse(uicb_t cmd);
void propertynotify(XEvent ev); void propertynotify(XEvent ev);
void unmapnotify(XEvent ev);
void getevent(void); void getevent(void);
/* util.c */ /* util.c */

2
wmfsrc
View File

@ -77,7 +77,7 @@ client
titlebar titlebar
{ {
position = "top" position = "top"
height = 13 height = 12
bg_normal = "#191919" bg_normal = "#191919"
bg_focus = "#191919" bg_focus = "#191919"
fg_normal = "#D4D4D4" fg_normal = "#D4D4D4"