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

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

[elpa] externals/exwm edc70eb 22/64: Remove redundant code caused by the


From: Chris Feng
Subject: [elpa] externals/exwm edc70eb 22/64: Remove redundant code caused by the concurrency of events
Date: Thu, 17 Sep 2015 23:17:57 +0000

branch: externals/exwm
commit edc70eb6616b818463c94b5ab8c9e3f1dfd177c9
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>

    Remove redundant code caused by the concurrency of events
    
    With the introduction of ch11ng/address@hidden, many weird behaviors should
    disappear. These include by not limit to
    * race conditions when managing a window (a workaround is provided in 
@14628a9)
    * race conditions when unmanaging a window
    This commit removes some corresponding code.
---
 exwm-manage.el |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)

diff --git a/exwm-manage.el b/exwm-manage.el
index 8bf118e..6c22948 100644
--- a/exwm-manage.el
+++ b/exwm-manage.el
@@ -42,30 +42,21 @@ corresponding buffer.")
         (when reply                     ;nil when destroyed
           (setq exwm--geometry reply))))))
 
-(defvar exwm-manage--manage-window-queue nil
-  "List of window IDs to prevent race conditions.")
-
 (defun exwm-manage--manage-window (id)
   "Manage window ID."
   (exwm--log "Try to manage #x%x" id)
   (setq exwm-input--focus-lock t)
   (catch 'return
     ;; Ensure it's not managed
-    (when (or (assoc id exwm--id-buffer-alist)
-              (memq id exwm-manage--manage-window-queue))
+    (when (assoc id exwm--id-buffer-alist)
       (exwm--log "#x%x is already managed" id)
       (throw 'return 'managed))
-    (push id exwm-manage--manage-window-queue) ;prevent reentering
     ;; Ensure it's alive
     (when (xcb:+request-checked+request-check exwm--connection
               (make-instance 'xcb:ChangeWindowAttributes
                              :window id :value-mask xcb:CW:EventMask
                              :event-mask exwm--client-event-mask))
-      (setq exwm-manage--manage-window-queue
-            (delq id exwm-manage--manage-window-queue)) ;cleanup
       (throw 'return 'dead))
-    (setq exwm-manage--manage-window-queue
-          (delq id exwm-manage--manage-window-queue)) ;cleanup (late enough)
     (with-current-buffer (generate-new-buffer "*EXWM*")
       (push `(,id . ,(current-buffer)) exwm--id-buffer-alist)
       (exwm-mode)



reply via email to

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