[statusbar] Fix event handling on child window

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-05-25 14:01:09 +02:00
parent c9fde5a9f0
commit 083a4f13f7
1 changed files with 7 additions and 0 deletions

View File

@ -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: