aboutsummaryrefslogtreecommitdiff
path: root/monsterwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'monsterwm.c')
-rw-r--r--monsterwm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/monsterwm.c b/monsterwm.c
index aec7b5c..af734fa 100644
--- a/monsterwm.c
+++ b/monsterwm.c
@@ -646,10 +646,10 @@ client* wintoclient(Window w) {
Bool found = False;
int cd = current_desktop;
save_desktop(cd);
- for(int d=0; d<DESKTOPS && !found; select_desktop(d++))
- for(c=head; c; c=c->next)
- if((found = (w == c->win)))
- break;
+ for(int d=0; d<DESKTOPS && !found; d++) {
+ select_desktop(d);
+ for(c=head; c; c=c->next) if((found = (w == c->win))) break;
+ }
select_desktop(cd);
return c;
}