tUse correct type to check event timestamp - glazier - window management experiments
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
(DIR) README
(DIR) LICENSE
---
(DIR) commit 92a6cbbeac2b7e3691f10db5e5f971f925bcdda1
(DIR) parent 0f940efc7e321de05741df974b7f1d76344e651c
(HTM) Author: Willy Goiffon <dev@z3bra.org>
Date: Tue, 22 Oct 2019 22:09:19 +0200
Use correct type to check event timestamp
Diffstat:
M glazier.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
(DIR) diff --git a/glazier.c b/glazier.c
t@@ -329,13 +329,13 @@ static int
cb_motion(xcb_generic_event_t *ev)
{
int x, y;
- static int last_time = 0;
+ static xcb_timestamp_t lasttime = 0;
xcb_motion_notify_event_t *e;
e = (xcb_motion_notify_event_t *)ev;
/* ignore some motion events if they happen too often */
- if (e->time - last_time < 32 || curwid == scrn->root)
+ if (e->time - lasttime < 32 || curwid == scrn->root)
return 0;
if (verbose)
t@@ -343,7 +343,7 @@ cb_motion(xcb_generic_event_t *ev)
x = e->root_x;
y = e->root_y;
- last_time = e->time;
+ lasttime = e->time;
switch (cursor.b) {
case 1: