From 0965e049d14664cd0d74059373618552b6a01460 Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Sun, 23 Nov 2008 16:32:09 +0100 Subject: [PATCH] wmfs: Typo & cosmetic --- src/config.c | 4 +--- src/infobar.c | 4 +++- src/mouse.c | 2 ++ src/wmfs.c | 5 ++++- src/wmfs.h | 3 +-- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/config.c b/src/config.c index 1d813d3..07343fc 100644 --- a/src/config.c +++ b/src/config.c @@ -509,10 +509,8 @@ init_conf(void) keys[j].cmd = (!strdup(var_to_str((cfg_getstr(cfgtmp, "cmd")))) ? NULL : strdup(var_to_str(cfg_getstr(cfgtmp, "cmd")))); } + cfg_free(cfg); -// cfg_free(cfg); - - cfg_free(cfgtmp); return; } diff --git a/src/infobar.c b/src/infobar.c index 4a9ae28..366f4cf 100644 --- a/src/infobar.c +++ b/src/infobar.c @@ -39,7 +39,8 @@ infobar_init(void) { int i, j = 0; - infobar = emalloc(1, sizeof(InfoBar)); + if(!infobar) + infobar = emalloc(1, sizeof(InfoBar)); infobar->geo.height = font->height * 1.5; infobar->geo.y = (conf.bartop) ? 0 : MAXH - infobar->geo.height; @@ -157,6 +158,7 @@ void uicb_infobar_togglepos(uicb_t cmd) { conf.bartop = !conf.bartop; + if(conf.bartop) sgeo.y = infobar->geo.height + TBARH; else diff --git a/src/mouse.c b/src/mouse.c index 3db3c8e..9897912 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -216,6 +216,7 @@ void uicb_mouse_move(uicb_t cmd) { CHECK(sel); + mouse_move(sel); return; @@ -228,6 +229,7 @@ void uicb_mouse_resize(uicb_t cmd) { CHECK(sel); + mouse_resize(sel); return; diff --git a/src/wmfs.c b/src/wmfs.c index 023b2ca..952346d 100644 --- a/src/wmfs.c +++ b/src/wmfs.c @@ -49,7 +49,7 @@ errorhandler(Display *d, XErrorEvent *event) /* Ignore focus change error for unmapped client */ if((c = client_gb_win(event->resourceid)) && c->unmapped - && event->request_code == 42) + && event->request_code == 42) /* 42: X_SetInputFocus (Xproto.h) */ return 0; @@ -199,6 +199,9 @@ scan(void) return; } +/** Reload the WMFS with the new configuration + * file changement *TESTING* +*/ void uicb_reload(uicb_t cmd) { diff --git a/src/wmfs.h b/src/wmfs.h index 4494434..e03404c 100644 --- a/src/wmfs.h +++ b/src/wmfs.h @@ -68,7 +68,7 @@ #define MAXW DisplayWidth(dpy, screen) #define SHADH 1 -#define SHADC 0x000000 +#define SHADC 0x000000 /* 'Cause i don't know how darken a color yet */ #define BORDH conf.client.borderheight #define TBARH conf.titlebar.height #define FRAMEW(w) w + BORDH * 2 @@ -106,7 +106,6 @@ void infobar_destroy(void); void uicb_infobar_togglepos(uicb_t cmd); /* client.c */ -int client_pertag(int tag); void client_attach(Client *c); void client_configure(Client *c); void client_detach(Client *c);