mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
fix wrong coords computing with left/right statusbar click
This commit is contained in:
parent
85e5baa4b1
commit
a4d4fedfac
1 changed files with 4 additions and 4 deletions
8
event.c
8
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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue