about summary refs log tree commit diff
path: root/exwm-manage.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2019-08-25T00·00+0000
committerChris Feng <chris.w.feng@gmail.com>2019-08-25T00·00+0000
commit5505cff826b361d5d0090a6314891005595e3279 (patch)
tree18ed9005bb3f1739c878a947312309f164094a78 /exwm-manage.el
parent5b9f4b0851d27e8132a930dfbfec0b94099a4c9f (diff)
Fix a lock issue with _NET_CLOSE_WINDOW and WM_DELETE_WINDOW
* exwm.el (exwm--on-ClientMessage): Calling `kill-buffer' directly
from an event context won't work since the DestroyNotify event for a
WM_DELETE_WINDOW request won't be handled until the current event
context terminates.

* exwm-manage.el (exwm-manage--kill-buffer-query-function): Avoid
potential side effects with MapWindow.
Diffstat (limited to 'exwm-manage.el')
-rw-r--r--exwm-manage.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/exwm-manage.el b/exwm-manage.el
index 797fc15cc678..deb475d53a4c 100644
--- a/exwm-manage.el
+++ b/exwm-manage.el
@@ -513,8 +513,10 @@ manager is shutting down."
   (catch 'return
     (when (or (not exwm--id)
               (xcb:+request-checked+request-check exwm--connection
-                  (make-instance 'xcb:MapWindow
-                                 :window exwm--id)))
+                  (make-instance 'xcb:ChangeWindowAttributes
+                                 :window exwm--id
+                                 :value-mask xcb:CW:EventMask
+                                 :event-mask (exwm--get-client-event-mask))))
       ;; The X window is no longer alive so just close the buffer.
       (when exwm--floating-frame
         (let ((window (frame-parameter exwm--floating-frame 'exwm-outer-id))