diff options
author | Chris Feng <chris.w.feng@gmail.com> | 2016-02-09T05·26+0800 |
---|---|---|
committer | Chris Feng <chris.w.feng@gmail.com> | 2016-02-09T05·26+0800 |
commit | 35d04c34685a1c1e9f351a2c50b3eea2b2fb5f25 (patch) | |
tree | 759a45d4d335fbae51e39a728008e3044df68424 /exwm-workspace.el | |
parent | fb9bfd291109d3bebc622f2c33a072fac475ac85 (diff) |
Fix bugs on managing/unmanaging X windows
* exwm-manage.el (exwm-manage--scan): Unmap X windows before managing them. (exwm-manage--on-UnmapNotify): Do not ignore synthetic UnmapNotify events (according to ICCCM). Do not use the `from-configure' slot which was mistakenly introduced due to the bug in `exwm-manage--scan'. * exwm-workspace.el (exwm-workspace--confirm-kill-emacs): Do more cleanups.
Diffstat (limited to 'exwm-workspace.el')
-rw-r--r-- | exwm-workspace.el | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/exwm-workspace.el b/exwm-workspace.el index feeb2fe028a4..3d7f67ecb8e4 100644 --- a/exwm-workspace.el +++ b/exwm-workspace.el @@ -462,11 +462,29 @@ This functions is modified from `display-buffer-reuse-window' and (0 (y-or-n-p prompt)) (x (yes-or-no-p (format "[EXWM] %d window%s currently alive. %s" x (if (= x 1) "" "s") prompt)))) + ;; Remove SubstructureRedirect event. + (xcb:+request exwm--connection + (make-instance 'xcb:ChangeWindowAttributes + :window exwm--root :value-mask xcb:CW:EventMask + :event-mask 0)) + ;; Remove the _NET_SUPPORTING_WM_CHECK X window. + (with-slots (value) + (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:ewmh:get-_NET_SUPPORTING_WM_CHECK + :window exwm--root)) + (xcb:+request exwm--connection + (make-instance 'xcb:DeleteProperty + :window exwm--root + :property xcb:Atom:_NET_SUPPORTING_WM_CHECK)) + (xcb:+request exwm--connection + (make-instance 'xcb:DestroyWindow :window value))) + ;; Unmanage all X windows. (dolist (i exwm--id-buffer-alist) (exwm-manage--unmanage-window (car i) t) (xcb:+request exwm--connection (make-instance 'xcb:MapWindow :window (car i)))) (xcb:flush exwm--connection) + (xcb:disconnect exwm--connection) t)) (defun exwm-workspace--init () |