fix wrong coords computing with left/right statusbar click
This commit is contained in:
parent
85e5baa4b1
commit
a4d4fedfac
8
event.c
8
event.c
|
@ -88,8 +88,8 @@ handle_event_buttonpress(XEvent *e)
|
||||||
case Right:
|
case Right:
|
||||||
for(widget = statusbar->widgets; widget; widget = widget->next)
|
for(widget = statusbar->widgets; widget; widget = widget->next)
|
||||||
if(ev->y >= widget->area.x && ev->y < widget->area.x + widget->area.width
|
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.width - ev->x >= widget->area.y
|
||||||
&& statusbar->sw->geometry.height - ev->x
|
&& statusbar->sw->geometry.width - ev->x
|
||||||
< widget->area.y + widget->area.height)
|
< widget->area.y + widget->area.height)
|
||||||
{
|
{
|
||||||
widget->button_press(widget, ev);
|
widget->button_press(widget, ev);
|
||||||
|
@ -98,8 +98,8 @@ handle_event_buttonpress(XEvent *e)
|
||||||
break;
|
break;
|
||||||
case Left:
|
case Left:
|
||||||
for(widget = statusbar->widgets; widget; widget = widget->next)
|
for(widget = statusbar->widgets; widget; widget = widget->next)
|
||||||
if(statusbar->sw->geometry.width - ev->y >= widget->area.x
|
if(statusbar->sw->geometry.height - ev->y >= widget->area.x
|
||||||
&& statusbar->sw->geometry.width - ev->y
|
&& statusbar->sw->geometry.height - ev->y
|
||||||
< widget->area.x + widget->area.width
|
< widget->area.x + widget->area.width
|
||||||
&& ev->x >= widget->area.y && ev->x < widget->area.y + widget->area.height)
|
&& ev->x >= widget->area.y && ev->x < widget->area.y + widget->area.height)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue