From eb414ce447f8118bba716fca4af46fff8981016b Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 5 Oct 2007 12:01:32 +0200 Subject: [PATCH] compute x one time only --- event.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/event.c b/event.c index 896b0bd60..120273639 100644 --- a/event.c +++ b/event.c @@ -179,9 +179,10 @@ handle_event_buttonpress(XEvent * e, awesome_config *awesomeconf) return; } } - if((ev->x < x + awesomeconf[screen].statusbar.width) && ev->button == Button1) + x += awesomeconf[screen].statusbar.width; + if(ev->x < x && ev->button == Button1) uicb_setlayout(e->xany.display, &dc[screen], &awesomeconf[screen], "+1"); - else if((ev->x < x + awesomeconf[screen].statusbar.width) && ev->button == Button3) + else if(ev->x < x && ev->button == Button3) uicb_setlayout(e->xany.display, &dc[screen], &awesomeconf[screen], "-1"); return; }