aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-07-26 19:13:11 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-07-26 19:14:00 +0200
commit7cf7869cbba9afb53e3ac24aeda93f9104f8d9f5 (patch)
tree0b69d9f862dcbd0581b3b97ec1ca731e36ea2920
parentadd46e1ebe3db518977faed17dd40a2a87aeae7b (diff)
downloadjwm-7cf7869cbba9afb53e3ac24aeda93f9104f8d9f5.tar.gz
Extend tray button click area to screen edgeHEADmaster
See Fitts' law.
-rw-r--r--src/tray.c4
1 files changed, 2 insertions, 2 deletions
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;