From 7cf7869cbba9afb53e3ac24aeda93f9104f8d9f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Mon, 26 Jul 2021 19:13:11 +0200 Subject: Extend tray button click area to screen edge See Fitts' law. --- src/tray.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/tray.c b/src/tray.c index 398373a..1641a20 100644 --- a/src/tray.c +++ b/src/tray.c @@ -673,8 +673,8 @@ HandleTrayButtonPress(TrayType *tp, const XButtonEvent *event) for(cp = tp->components; cp; cp = cp->next) { width = cp->width; height = cp->height; - if(event->x >= xoffset && event->x < xoffset + width) { - if(event->y >= yoffset && event->y < yoffset + height) { + if(event->x >= xoffset - 1 && event->x <= xoffset + width) { + if(event->y >= yoffset && event->y <= yoffset+height) { if(cp->ProcessButtonEvent) { x = event->x - xoffset; y = event->y - yoffset; -- cgit v1.2.3