From a4d4fedfac740d91a8472b7337ea9b54b91849f5 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 8 Feb 2008 15:35:09 +0100 Subject: [PATCH] fix wrong coords computing with left/right statusbar click --- event.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/event.c b/event.c index 236b3643a..159b251f0 100644 --- a/event.c +++ b/event.c @@ -88,8 +88,8 @@ handle_event_buttonpress(XEvent *e) case Right: for(widget = statusbar->widgets; widget; widget = widget->next) if(ev->y >= widget->area.x && ev->y < widget->area.x + widget->area.width - && statusbar->sw->geometry.height - ev->x >= widget->area.y - && statusbar->sw->geometry.height - ev->x + && statusbar->sw->geometry.width - ev->x >= widget->area.y + && statusbar->sw->geometry.width - ev->x < widget->area.y + widget->area.height) { widget->button_press(widget, ev); @@ -98,8 +98,8 @@ handle_event_buttonpress(XEvent *e) break; case Left: for(widget = statusbar->widgets; widget; widget = widget->next) - if(statusbar->sw->geometry.width - ev->y >= widget->area.x - && statusbar->sw->geometry.width - ev->y + if(statusbar->sw->geometry.height - ev->y >= widget->area.x + && statusbar->sw->geometry.height - ev->y < widget->area.x + widget->area.width && ev->x >= widget->area.y && ev->x < widget->area.y + widget->area.height) {