Track the last timestamp received from the server
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
47caab4580
commit
ec63afc822
10
event.c
10
event.c
|
@ -138,6 +138,8 @@ event_handle_button(xcb_button_press_event_t *ev)
|
||||||
client_t *c;
|
client_t *c;
|
||||||
wibox_t *wibox;
|
wibox_t *wibox;
|
||||||
|
|
||||||
|
globalconf.timestamp = ev->time;
|
||||||
|
|
||||||
if(event_handle_mousegrabber(ev->root_x, ev->root_y, 1 << (ev->detail - 1 + 8)))
|
if(event_handle_mousegrabber(ev->root_x, ev->root_y, 1 << (ev->detail - 1 + 8)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -387,6 +389,8 @@ event_handle_motionnotify(xcb_motion_notify_event_t *ev)
|
||||||
{
|
{
|
||||||
wibox_t *wibox;
|
wibox_t *wibox;
|
||||||
|
|
||||||
|
globalconf.timestamp = ev->time;
|
||||||
|
|
||||||
if(event_handle_mousegrabber(ev->root_x, ev->root_y, ev->state))
|
if(event_handle_mousegrabber(ev->root_x, ev->root_y, ev->state))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -410,6 +414,8 @@ event_handle_leavenotify(xcb_leave_notify_event_t *ev)
|
||||||
wibox_t *wibox;
|
wibox_t *wibox;
|
||||||
client_t *c;
|
client_t *c;
|
||||||
|
|
||||||
|
globalconf.timestamp = ev->time;
|
||||||
|
|
||||||
if(ev->mode != XCB_NOTIFY_MODE_NORMAL)
|
if(ev->mode != XCB_NOTIFY_MODE_NORMAL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -453,6 +459,8 @@ event_handle_enternotify(xcb_enter_notify_event_t *ev)
|
||||||
client_t *c;
|
client_t *c;
|
||||||
wibox_t *wibox;
|
wibox_t *wibox;
|
||||||
|
|
||||||
|
globalconf.timestamp = ev->time;
|
||||||
|
|
||||||
if(ev->mode != XCB_NOTIFY_MODE_NORMAL)
|
if(ev->mode != XCB_NOTIFY_MODE_NORMAL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -532,6 +540,8 @@ event_handle_expose(xcb_expose_event_t *ev)
|
||||||
static void
|
static void
|
||||||
event_handle_key(xcb_key_press_event_t *ev)
|
event_handle_key(xcb_key_press_event_t *ev)
|
||||||
{
|
{
|
||||||
|
globalconf.timestamp = ev->time;
|
||||||
|
|
||||||
if(globalconf.keygrabber != LUA_REFNIL)
|
if(globalconf.keygrabber != LUA_REFNIL)
|
||||||
{
|
{
|
||||||
lua_rawgeti(globalconf.L, LUA_REGISTRYINDEX, globalconf.keygrabber);
|
lua_rawgeti(globalconf.L, LUA_REGISTRYINDEX, globalconf.keygrabber);
|
||||||
|
|
|
@ -96,6 +96,8 @@ typedef struct
|
||||||
wibox_array_t wiboxes;
|
wibox_array_t wiboxes;
|
||||||
/** The startup notification display struct */
|
/** The startup notification display struct */
|
||||||
SnDisplay *sndisplay;
|
SnDisplay *sndisplay;
|
||||||
|
/** Latest timestamp we got from the X server */
|
||||||
|
xcb_timestamp_t timestamp;
|
||||||
} awesome_t;
|
} awesome_t;
|
||||||
|
|
||||||
extern awesome_t globalconf;
|
extern awesome_t globalconf;
|
||||||
|
|
|
@ -384,6 +384,8 @@ property_handle_propertynotify(xcb_property_notify_event_t *ev)
|
||||||
int (*handler)(uint8_t state,
|
int (*handler)(uint8_t state,
|
||||||
xcb_window_t window) = NULL;
|
xcb_window_t window) = NULL;
|
||||||
|
|
||||||
|
globalconf.timestamp = ev->time;
|
||||||
|
|
||||||
/* Find the correct event handler */
|
/* Find the correct event handler */
|
||||||
#define HANDLE(atom_, cb) \
|
#define HANDLE(atom_, cb) \
|
||||||
if (ev->atom == atom_) \
|
if (ev->atom == atom_) \
|
||||||
|
|
Loading…
Reference in New Issue