emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/xelb 81c699f 37/42: Protect process-send-string


From: Chris Feng
Subject: [elpa] externals/xelb 81c699f 37/42: Protect process-send-string
Date: Thu, 17 Sep 2015 23:16:51 +0000

branch: externals/xelb
commit 81c699fbc8e34ac81c2ba9819ae7592cbd2f8d78
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>

    Protect process-send-string
    
    * xcb.el (xcb:flush): protect process-send-string since input might also 
come
      when calling it. Courtesy of @pipcet.
---
 xcb.el |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/xcb.el b/xcb.el
index 88ff1fb..029b2cf 100644
--- a/xcb.el
+++ b/xcb.el
@@ -356,8 +356,10 @@ classes of EVENT (since they have the same event number)."
   (let ((cache (slot-value obj 'request-cache)))
     (when (< 0 (length cache))
       (setf (slot-value obj 'request-cache) []) ;should be cleared ASAP
+      (cl-incf (slot-value obj 'event-lock))
       (process-send-string (slot-value obj 'process)
-                           (apply #'unibyte-string (append cache nil))))))
+                           (apply #'unibyte-string (append cache nil)))
+      (cl-decf (slot-value obj 'event-lock)))))
 
 (cl-defmethod xcb:get-extension-data ((obj xcb:connection) namespace)
   "Fetch the extension data from X server (block until data is retrieved)."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]