aboutsummaryrefslogtreecommitdiff
path: root/monsterwm.c
diff options
context:
space:
mode:
authorIvan Kanakarakis <ivan.kanak@gmail.com>2012-07-09 20:17:24 +0300
committerIvan Kanakarakis <ivan.kanak@gmail.com>2012-07-20 18:52:18 +0300
commit2f5e013d29a04852f5926f82edf6dd3f3fed1955 (patch)
tree1407c93da502f2acca3981a381631b7ced1301de /monsterwm.c
parent7ec51316c37c4abf258fba6beb3b8ac5da4823bd (diff)
fix calls to desktopinfo
Diffstat (limited to 'monsterwm.c')
-rw-r--r--monsterwm.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/monsterwm.c b/monsterwm.c
index bfe8a27..facff32 100644
--- a/monsterwm.c
+++ b/monsterwm.c
@@ -252,7 +252,7 @@ void client_to_desktop(const Arg *arg) {
if (FOLLOW_WINDOW) change_desktop(arg);
else if (!(n->curr->isfloat || n->curr->istrans) || (d->head && !d->head->next)) tile(d);
- desktopinfo();
+ if (!FOLLOW_WINDOW) desktopinfo();
}
/* To change the state of a mapped window, a client MUST
@@ -331,7 +331,7 @@ void desktopinfo(void) {
void destroynotify(XEvent *e) {
Desktop *d = NULL;
Client *c = NULL;
- if (wintoclient(e->xdestroywindow.window, &c, &d)) { removeclient(c, d); desktopinfo(); }
+ if (wintoclient(e->xdestroywindow.window, &c, &d)) removeclient(c, d);
}
/* when the mouse enters a window's borders
@@ -529,7 +529,7 @@ void maprequest(XEvent *e) {
else if (follow) change_desktop(&(Arg){.i = newdsk});
focus(c, d);
- desktopinfo();
+ if (!follow) desktopinfo();
}
/* grab the pointer and get it's current position
@@ -717,6 +717,7 @@ void removeclient(Client *c, Desktop *d) {
if (c == d->curr || (d->head && !d->head->next)) focus(d->prev, d);
if (!(c->isfloat || c->istrans) || (d->head && !d->head->next)) tile(d);
free(c);
+ desktopinfo();
}
/* main event loop - on receival of an event call the appropriate event handler */
@@ -866,7 +867,7 @@ void tile(Desktop *d) {
void unmapnotify(XEvent *e) {
Desktop *d = NULL;
Client *c = NULL;
- if (e->xunmap.send_event && wintoclient(e->xunmap.window, &c, &d)) { removeclient(c, d); desktopinfo(); }
+ if (e->xunmap.send_event && wintoclient(e->xunmap.window, &c, &d)) removeclient(c, d);
}
/* find to which client and desktop the given window belongs to */