From 1ddbfaaaf042c69fdf834f9e2677b6d29a1ebb34 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 21 Oct 2008 17:50:35 +0200 Subject: [PATCH] event: handle enter widget on window enter Signed-off-by: Julien Danjou --- event.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/event.c b/event.c index 2753fb1f..8faff33a 100644 --- a/event.c +++ b/event.c @@ -411,13 +411,22 @@ event_handle_enternotify(void *data __attribute__ ((unused)), { client_t *c; xembed_window_t *emwin; + wibox_t *wibox; + widget_node_t *w; if(ev->mode != XCB_NOTIFY_MODE_NORMAL || (ev->root_x == globalconf.pointer_x && ev->root_y == globalconf.pointer_y)) return 0; - if((c = client_getbytitlebarwin(ev->event)) + + if((wibox = wibox_getbywin(ev->event)) + && (w = widget_getbycoords(wibox->position, &wibox->widgets, + wibox->sw.geometry.width, + wibox->sw.geometry.height, + &ev->event_x, &ev->event_y))) + event_handle_widget_motionnotify(wibox, &wibox->mouse_over, w); + else if((c = client_getbytitlebarwin(ev->event)) || (c = client_getbywin(ev->event))) { window_buttons_grab(c->win, ev->root, &c->buttons);