fix wrong coords computing with left/right statusbar click

This commit is contained in:
Julien Danjou 2008-02-08 15:35:09 +01:00
parent 85e5baa4b1
commit a4d4fedfac

View file

@ -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)
{