about summary refs log tree commit diff
path: root/exwm-manage.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2016-02-07T03·25+0800
committerChris Feng <chris.w.feng@gmail.com>2016-02-07T03·25+0800
commit15cdf8f5897183adf5426ecc280eb61626e2c980 (patch)
treec789d486a8859acdf98b4132ad7b47b71c9be7d4 /exwm-manage.el
parente2edf81271e1a7dd148aa7386b730ae2838c2860 (diff)
Unmanage X windows on exit
* exwm-workspace.el (exwm-workspace--confirm-kill-emacs): New function
called on exit to unmanage X windows.
(exwm-workspace--init): Set `confirm-kill-emacs' to
`exwm-workspace--confirm-kill-emacs'.

* exwm-manage.el (exwm-manage--on-UnmapNotify): Ignore UnmapNotify event
generated as a result of parent being resized.
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 b32d677ea92b..b899afbb851f 100644
--- a/exwm-manage.el
+++ b/exwm-manage.el
@@ -421,8 +421,10 @@ Would you like to kill it? "
   (unless synthetic
     (let ((obj (make-instance 'xcb:UnmapNotify)))
       (xcb:unmarshal obj data)
-      (exwm--log "UnmapNotify from #x%x" (slot-value obj 'window))
-      (exwm-manage--unmanage-window (slot-value obj 'window) t))))
+      (with-slots (window from-configure) obj
+        (unless from-configure          ;the parent is being resized
+          (exwm--log "UnmapNotify from #x%x" window)
+          (exwm-manage--unmanage-window window t))))))
 
 (defun exwm-manage--on-DestroyNotify (data synthetic)
   "Handle DestroyNotify event."