Bugfix: reset last_timestamp for each event
Patch status: rejected
Patch by Tony Crisci
Long description:
Reset last_timestamp to XCB_CURRENT_TIME whenever a new event comes in. This should be set to the value of the timestamp for the incoming event for any event that contains a timestamp during event handling. For events that do not contain a timestamp, this avoids using an old timestamp when rendering which can lead to focus problems when a timestamp is used multiple times for handling different events. fixes #1383
To apply this patch, use:
curl http://cr.i3wm.org/patch/667/raw.patch | git am
b/src/handlers.c
21 |
@@ -1232,6 +1232,10 @@ void handle_event(int type, xcb_generic_event_t *event) { |
22 |
return; |
23 |
} |
24 |
|
25 |
+ /* reset last_timestamp to avoid using an old value for events that do not |
26 |
+ * have a timestamp */ |
27 |
+ last_timestamp = XCB_CURRENT_TIME; |
28 |
+ |
29 |
switch (type) { |
30 |
case XCB_KEY_PRESS: |
31 |
case XCB_KEY_RELEASE: |