aboutsummaryrefslogtreecommitdiff
path: root/monsterwm.c
diff options
context:
space:
mode:
authorIvan Kanakarakis <ivan.kanak@gmail.com>2012-01-08 21:25:14 +0200
committerIvan Kanakarakis <ivan.kanak@gmail.com>2012-01-08 21:25:14 +0200
commit8715025216658e92699f4e8eb7824c1cb18b8064 (patch)
tree708e32916deaeec8146802dfeb091bd9e048a2eb /monsterwm.c
parent9bf79d2a83f7c8afbe3ca5855c872fb728483794 (diff)
a shorter loop for buttonpress() function
Diffstat (limited to 'monsterwm.c')
-rw-r--r--monsterwm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/monsterwm.c b/monsterwm.c
index 92ed596..47bdfe1 100644
--- a/monsterwm.c
+++ b/monsterwm.c
@@ -159,7 +159,7 @@ void addwindow(Window w) {
void buttonpress(XEvent *e) {
if (CLICK_TO_FOCUS && e->xbutton.window != current->win && e->xbutton.button == Button1)
- for (current=head; current; current=current->next) if (e->xbutton.window == current->win) break;
+ for (current=head; current && current->win != e->xbutton.window; current=current->next);
if (!current) current = head;
update_current();
}