diff --git a/src/client.c b/src/client.c index c70223a..caa118c 100644 --- a/src/client.c +++ b/src/client.c @@ -464,8 +464,6 @@ client_unmanage(Client *c) selbytag[i] = NULL; /* }}} */ - /* Detach this client of the chain - * and set the withdraw state */ client_detach(c); setwinstate(c->win, WithdrawnState); XDestroySubwindows(dpy, c->frame); diff --git a/src/init.c b/src/init.c index b72ce64..a51144b 100644 --- a/src/init.c +++ b/src/init.c @@ -36,6 +36,7 @@ void init(void) { /* First init */ + XSetErrorHandler(errorhandlerdummy); gc = DefaultGC(dpy, screen); screen = DefaultScreen(dpy); init_font(); diff --git a/src/mouse.c b/src/mouse.c index af49e2f..62ddb05 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -153,11 +153,10 @@ mouse_resize(Client *c) mwf = 1 - fy; else if(tags[seltag].layout.func == tile_bottom) mwf = fy; + else + mwf = tags[seltag].mwfact; - tags[seltag].mwfact = - (((0.01) > (mwf) ? (0.01) : (mwf) ) < 0.99) - ? ((0.01) > (mwf) ? (0.01): (mwf)) - : 0.99; + tags[seltag].mwfact = (mwf < 0.05) ? 0.05 : ((mwf > 0.95) ? 0.95 : mwf); arrange(); } diff --git a/src/wmfs.c b/src/wmfs.c index 8c3c99a..620defa 100644 --- a/src/wmfs.c +++ b/src/wmfs.c @@ -166,6 +166,7 @@ scan(void) continue; if(wa.map_state == IsViewable || getwinstate(wins[i]) == IconicState) client_manage(wins[i], &wa); + } for(i = 0; i < num; i++) { @@ -194,8 +195,7 @@ handle_signal(int signum) for(c = clients; c; c = c->next) { XReparentWindow(dpy, c->win, root, 0, 0); - XDestroySubwindows(dpy, c->frame); - XDestroyWindow(dpy, c->frame); + client_unmanage(c); } fprintf(stderr, "\nExit WMFS... Bye !!\n"); quit(); @@ -264,7 +264,6 @@ main(int argc, char **argv) /* Check if an other WM is already running; set the error handler */ XSetErrorHandler(errorhandler); - XSetErrorHandler(errorhandlerdummy); /* Let's Go ! */ init_conf();