From 083a4f13f727c5b39b6c39618239868b5f4dbca1 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sun, 25 May 2008 14:01:09 +0200 Subject: [PATCH] [statusbar] Fix event handling on child window Signed-off-by: Julien Danjou --- event.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/event.c b/event.c index 9851645d..220f678b 100644 --- a/event.c +++ b/event.c @@ -77,6 +77,13 @@ event_handle_buttonpress(void *data __attribute__ ((unused)), for(statusbar = globalconf.screens[screen].statusbar; statusbar; statusbar = statusbar->next) if(statusbar->sw->window == ev->event || statusbar->sw->window == ev->child) { + /* If the statusbar is child, then x,y are + * relative to root window */ + if(statusbar->sw->window == ev->child) + { + ev->event_x -= statusbar->sw->geometry.x; + ev->event_y -= statusbar->sw->geometry.y; + } switch(statusbar->position) { case Top: