aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kanakarakis <ivan.kanak@gmail.com>2012-01-03 23:01:09 +0200
committerIvan Kanakarakis <ivan.kanak@gmail.com>2012-01-03 23:01:59 +0200
commit6d3d076c870fc26e26518397df4d7eeae421bd81 (patch)
tree6a91c45b5ff80bc7ab72b68d8621de9eef0a0794
parent202b6d46a77934e9a642981b9e21b7ddb8215fe4 (diff)
rework - minor change on wintoclient()
-rw-r--r--monsterwm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/monsterwm.c b/monsterwm.c
index b315900..1315002 100644
--- a/monsterwm.c
+++ b/monsterwm.c
@@ -691,9 +691,8 @@ void update_current(void) {
client* wintoclient(Window w) {
client *c = NULL;
- Bool found = False;
- int d, cd = current_desktop;
- for (d=0; d<DESKTOPS && !found; ++d)
+ int d = 0, cd = current_desktop;
+ for (Bool found = False; d<DESKTOPS && !found; ++d)
for (select_desktop(d), c=head; c && !((found = (w == c->win))); c=c->next);
select_desktop(cd);
return c;