[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/xelb 40f873b: Save a sequence number after the packet i
From: |
Chris Feng |
Subject: |
[elpa] externals/xelb 40f873b: Save a sequence number after the packet is saved |
Date: |
Fri, 12 Aug 2016 14:38:37 +0000 (UTC) |
branch: externals/xelb
commit 40f873b08178ffce8d4344452d83a842cd580110
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>
Save a sequence number after the packet is saved
* xcb.el (xcb:-convert-sequence): Do not save the sequence number here.
(xcb:-connection-filter): Save it here.
---
xcb.el | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/xcb.el b/xcb.el
index 5a75714..f372bd6 100644
--- a/xcb.el
+++ b/xcb.el
@@ -268,7 +268,7 @@
"Convert 16-bit sequence number SEQUENCE16 (read from a packet).
The result would be 29 or 61 bits, depending on the machine."
- (with-slots (request-sequence last-seen-sequence) obj
+ (with-slots (request-sequence) obj
;; Assume there are no more than #xFFFF requests sent since the
;; request corresponding to this packet was made. Because errors
;; and replies are always read out in the process filter, this
@@ -279,7 +279,6 @@ The result would be 29 or 61 bits, depending on the
machine."
;; `xcb:-cache-request' ensures sequence number never wraps.
(when (> sequence request-sequence)
(cl-decf sequence #x10000))
- (setf last-seen-sequence sequence)
sequence)))
(defun xcb:-connection-filter (process message)
@@ -312,7 +311,8 @@ Concurrency is disabled as it breaks the orders of errors,
replies and events."
(push `(,(aref cache 1) .
,(substring cache 0 32))
struct))))
- (setq cache (substring cache 32))))
+ (setq cache (substring cache 32))
+ (setf (slot-value connection 'last-seen-sequence) sequence)))
(1 ;reply
(let* ((reply-words (funcall (if xcb:lsb #'xcb:-unpack-u4-lsb
#'xcb:-unpack-u4)
@@ -339,7 +339,8 @@ Concurrency is disabled as it breaks the orders of errors,
replies and events."
;; Multiple replies
`(,(car struct) ,@(cdr struct)
,(substring cache 0 reply-length))))))
- (setq cache (substring cache reply-length))))
+ (setq cache (substring cache reply-length))
+ (setf (slot-value connection 'last-seen-sequence) sequence)))
(x ;event
(let (synthetic listener event-length)
(when (/= 0 (logand x #x80)) ;synthetic event
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/xelb 40f873b: Save a sequence number after the packet is saved,
Chris Feng <=