From 4f61841f0ecb5d704d3ab23e9aee07696c99729a Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sat, 25 Oct 2008 15:35:14 +0200 Subject: [PATCH] event: save mouse position in wibox events This allow focus to work correctly if wibox disapears. Signed-off-by: Julien Danjou --- event.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/event.c b/event.c index a16a4ba90..36bc65417 100644 --- a/event.c +++ b/event.c @@ -372,7 +372,11 @@ event_handle_motionnotify(void *data __attribute__ ((unused)), wibox->sw.geometry.width, wibox->sw.geometry.height, &ev->event_x, &ev->event_y))) + { + globalconf.pointer_x = ev->root_x; + globalconf.pointer_y = ev->root_y; event_handle_widget_motionnotify(wibox, &wibox->mouse_over, w); + } return 0; } @@ -426,7 +430,11 @@ event_handle_enternotify(void *data __attribute__ ((unused)), wibox->sw.geometry.width, wibox->sw.geometry.height, &ev->event_x, &ev->event_y))) + { + globalconf.pointer_x = ev->root_x; + globalconf.pointer_y = ev->root_y; event_handle_widget_motionnotify(wibox, &wibox->mouse_over, w); + } else if((c = client_getbytitlebarwin(ev->event)) || (c = client_getbywin(ev->event))) {