diff --git a/event.c b/event.c index 2c5894014..f1ddf7174 100644 --- a/event.c +++ b/event.c @@ -138,6 +138,8 @@ event_handle_button(xcb_button_press_event_t *ev) client_t *c; wibox_t *wibox; + globalconf.timestamp = ev->time; + if(event_handle_mousegrabber(ev->root_x, ev->root_y, 1 << (ev->detail - 1 + 8))) return; @@ -387,6 +389,8 @@ event_handle_motionnotify(xcb_motion_notify_event_t *ev) { wibox_t *wibox; + globalconf.timestamp = ev->time; + if(event_handle_mousegrabber(ev->root_x, ev->root_y, ev->state)) return; @@ -410,6 +414,8 @@ event_handle_leavenotify(xcb_leave_notify_event_t *ev) wibox_t *wibox; client_t *c; + globalconf.timestamp = ev->time; + if(ev->mode != XCB_NOTIFY_MODE_NORMAL) return; @@ -453,6 +459,8 @@ event_handle_enternotify(xcb_enter_notify_event_t *ev) client_t *c; wibox_t *wibox; + globalconf.timestamp = ev->time; + if(ev->mode != XCB_NOTIFY_MODE_NORMAL) return; @@ -532,6 +540,8 @@ event_handle_expose(xcb_expose_event_t *ev) static void event_handle_key(xcb_key_press_event_t *ev) { + globalconf.timestamp = ev->time; + if(globalconf.keygrabber != LUA_REFNIL) { lua_rawgeti(globalconf.L, LUA_REGISTRYINDEX, globalconf.keygrabber); diff --git a/globalconf.h b/globalconf.h index 169df9401..fd458ebc3 100644 --- a/globalconf.h +++ b/globalconf.h @@ -96,6 +96,8 @@ typedef struct wibox_array_t wiboxes; /** The startup notification display struct */ SnDisplay *sndisplay; + /** Latest timestamp we got from the X server */ + xcb_timestamp_t timestamp; } awesome_t; extern awesome_t globalconf; diff --git a/property.c b/property.c index 50ca1ce83..bb138d905 100644 --- a/property.c +++ b/property.c @@ -384,6 +384,8 @@ property_handle_propertynotify(xcb_property_notify_event_t *ev) int (*handler)(uint8_t state, xcb_window_t window) = NULL; + globalconf.timestamp = ev->time; + /* Find the correct event handler */ #define HANDLE(atom_, cb) \ if (ev->atom == atom_) \