Track the last timestamp received from the server
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
b938ce00b5
commit
5225683d9b
10
event.c
10
event.c
|
@ -139,6 +139,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;
|
||||
|
||||
|
@ -400,6 +402,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;
|
||||
|
||||
|
@ -423,6 +427,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;
|
||||
|
||||
|
@ -471,6 +477,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;
|
||||
|
||||
|
@ -555,6 +563,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);
|
||||
|
|
|
@ -131,6 +131,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;
|
||||
|
|
|
@ -418,6 +418,8 @@ property_handle_propertynotify(xcb_property_notify_event_t *ev)
|
|||
xcb_atom_t name,
|
||||
xcb_get_property_reply_t *reply) = NULL;
|
||||
|
||||
globalconf.timestamp = ev->time;
|
||||
|
||||
/* Find the correct event handler */
|
||||
#define HANDLE(atom_, cb, len) \
|
||||
if (ev->atom == atom_) \
|
||||
|
|
Loading…
Reference in New Issue