diff options
author | Chris Feng <chris.w.feng@gmail.com> | 2016-07-14T14·08+0800 |
---|---|---|
committer | Chris Feng <chris.w.feng@gmail.com> | 2016-07-14T14·08+0800 |
commit | 39dc328157a970742aa40d3d9169376d2208fce3 (patch) | |
tree | 9604b941a55dc13328afc72f02859bb004b37ab8 /exwm-manage.el | |
parent | 6c8255bf3978a4df3d76ffd6f7d6bbdbba8bba19 (diff) |
Fix various stability issues
* exwm-input.el (exwm-input--on-KeyPress-line-mode) (exwm-input--on-KeyPress-char-mode): Append events at the tail. * exwm-manage.el (exwm-manage--unmanage-window): Remove the _NET_WM_DESKTOP property when an X window is withdrawn. * exwm-systemtray.el (exwm-systemtray--init): * exwm-workspace.el (exwm-workspace--confirm-kill-emacs): Issue warning rather than error when there's an existing tray running. * exwm.el (exwm--on-ClientMessage): The buffer window can be on a floating frame.
Diffstat (limited to 'exwm-manage.el')
-rw-r--r-- | exwm-manage.el | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/exwm-manage.el b/exwm-manage.el index d4b3de48f904..13948902d281 100644 --- a/exwm-manage.el +++ b/exwm-manage.el @@ -248,7 +248,11 @@ corresponding buffer.") (run-hooks 'exwm-manage-finish-hook))))) (defun exwm-manage--unmanage-window (id &optional withdraw-only) - "Unmanage window ID." + "Unmanage window ID. + +If WITHDRAW-ONLY is non-nil, the X window will be properly placed back to the +root window. Set WITHDRAW-ONLY to 'quit if this functions is used when window +manager is shutting down." (let ((buffer (exwm--id->buffer id))) (exwm--log "Unmanage #x%x (buffer: %s, widthdraw: %s)" id buffer withdraw-only) @@ -295,7 +299,13 @@ corresponding buffer.") ;; Delete WM_STATE property (xcb:+request exwm--connection (make-instance 'xcb:DeleteProperty - :window id :property xcb:Atom:WM_STATE))) + :window id :property xcb:Atom:WM_STATE)) + (unless (eq withdraw-only 'quit) + ;; Remove _NET_WM_DESKTOP. + (xcb:+request exwm--connection + (make-instance 'xcb:DeleteProperty + :window id + :property xcb:Atom:_NET_WM_DESKTOP)))) (when exwm--floating-frame ;; Unmap the floating frame before destroying the containers. (let ((window (frame-parameter exwm--floating-frame 'exwm-outer-id))) |