From 736b55b6c74030090cfe67106e16486341c2ae7c Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Thu, 22 Sep 2011 01:34:36 +0200 Subject: [PATCH] Minor fix --- wmfs2/src/client.c | 33 +++++++++++++-------------------- wmfs2/src/client.h | 2 +- wmfs2/src/tag.c | 6 +++--- 3 files changed, 17 insertions(+), 24 deletions(-) diff --git a/wmfs2/src/client.c b/wmfs2/src/client.c index d8d51bf..ef35441 100644 --- a/wmfs2/src/client.c +++ b/wmfs2/src/client.c @@ -124,7 +124,7 @@ client_next_with_pos(struct client *bc, Position p) { struct client *c; int x, y; - const static char scanfac[PositionLast] = { +1, -1, 0, 0 }; + const static char scanfac[PositionLast] = { +10, -10, 0, 0 }; /* * Set start place of pointer (edge with position @@ -259,7 +259,6 @@ client_get_name(struct client *c) void client_close(struct client *c) { - bool canbedel; int proto; XEvent ev; Atom *atom = NULL; @@ -270,27 +269,21 @@ client_close(struct client *c) while(proto--) if(atom[proto] == ATOM("WM_DELETE_WINDOW")) { - canbedel = true; + ev.type = ClientMessage; + ev.xclient.window = c->win; + ev.xclient.message_type = ATOM("WM_PROTOCOLS"); + ev.xclient.format = 32; + ev.xclient.data.l[0] = ATOM("WM_DELETE_WINDOW"); + ev.xclient.data.l[1] = CurrentTime; + + XSendEvent(W->dpy, c->win, False, NoEventMask, &ev); XFree(atom); - break; + + return; } - - if(canbedel) - { - ev.type = ClientMessage; - ev.xclient.window = c->win; - ev.xclient.message_type = ATOM("WM_PROTOCOLS"); - ev.xclient.format = 32; - ev.xclient.data.l[0] = ATOM("WM_DELETE_WINDOW"); - ev.xclient.data.l[1] = CurrentTime; - - XSendEvent(W->dpy, c->win, False, NoEventMask, &ev); - } - else - XKillClient(W->dpy, c->win); } - else - XKillClient(W->dpy, c->win); + + XKillClient(W->dpy, c->win); } void diff --git a/wmfs2/src/client.h b/wmfs2/src/client.h index cc5134c..fce8ed2 100644 --- a/wmfs2/src/client.h +++ b/wmfs2/src/client.h @@ -89,7 +89,7 @@ client_fac_geo(struct client *c, Position p, int fac) /* Check for incompatible geo */ if(cg.w > c->screen->ugeo.w || cg.h > c->screen->ugeo.h - || cg.w < 3 || cg.h < 3) + || cg.w < 5 || cg.h < 5) return false; /* Set transformed geo in tmp geo */ diff --git a/wmfs2/src/tag.c b/wmfs2/src/tag.c index 9b90b9f..842e83f 100644 --- a/wmfs2/src/tag.c +++ b/wmfs2/src/tag.c @@ -109,15 +109,15 @@ tag_client(struct tag *t, struct client *c) return; } + /* Reparent client win in frame win */ + XReparentWindow(W->dpy, c->win, t->frame, 0, 0); + /* Map frame if tag was empty */ if(SLIST_EMPTY(&t->clients)) WIN_STATE(t->frame, Map); c->tag = t; - /* Reparent client win in frame win */ - XReparentWindow(W->dpy, c->win, t->frame, 0, 0); - layout_split_integrate(c, t->sel); /* Insert in new tag list */