compute x one time only

This commit is contained in:
Julien Danjou 2007-10-05 12:01:32 +02:00
parent b00f9ab1f6
commit eb414ce447
1 changed files with 3 additions and 2 deletions

View File

@ -179,9 +179,10 @@ handle_event_buttonpress(XEvent * e, awesome_config *awesomeconf)
return; 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"); 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"); uicb_setlayout(e->xany.display, &dc[screen], &awesomeconf[screen], "-1");
return; return;
} }