From 6178417b61a337befae10a5d156d3a184631aa83 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sun, 12 Apr 2009 14:32:36 +0200 Subject: [PATCH] event: leave_notify: handle titlebar correctly Signed-off-by: Julien Danjou --- event.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/event.c b/event.c index f58b82a8..8c82dfda 100644 --- a/event.c +++ b/event.c @@ -457,15 +457,14 @@ event_handle_leavenotify(void *data __attribute__ ((unused)), if(ev->mode != XCB_NOTIFY_MODE_NORMAL) return 0; - if((c = client_getbywin(ev->event))) - { + if((c = client_getbytitlebarwin(ev->event)) || (c = client_getbywin(ev->event))) if(globalconf.hooks.mouse_leave != LUA_REFNIL) { luaA_client_userdata_new(globalconf.L, c); luaA_dofunction(globalconf.L, globalconf.hooks.mouse_leave, 1, 0); } - } - else if((wibox = wibox_getbywin(ev->event))) + + if((wibox = wibox_getbywin(ev->event))) { if(wibox->mouse_over) {