mirror of
https://github.com/emacs-exwm/exwm.git
synced 2024-11-27 14:57:59 +01:00
Fix systemtray applications crash when restarting
* exwm-systemtray.el (exwm-systemtray--exit): Reparent out the tray embedder to protect tray icons.
This commit is contained in:
parent
75eb43e1e0
commit
3edf2e8880
1 changed files with 12 additions and 0 deletions
|
@ -480,6 +480,18 @@ You shall use the default value if using auto-hide minibuffer.")
|
|||
(defun exwm-systemtray--exit ()
|
||||
"Exit the systemtray module."
|
||||
(when exwm-systemtray--connection
|
||||
;; Hide & reparent out the embedder before disconnection to prevent
|
||||
;; embedded icons from being reparented to an Emacs frame (which is the
|
||||
;; parent of the embedder).
|
||||
(xcb:+request exwm-systemtray--connection
|
||||
(make-instance 'xcb:UnmapWindow
|
||||
:window exwm-systemtray--embedder))
|
||||
(xcb:+request exwm-systemtray--connection
|
||||
(make-instance 'xcb:ReparentWindow
|
||||
:window exwm-systemtray--embedder
|
||||
:parent exwm--root
|
||||
:x 0
|
||||
:y 0))
|
||||
(xcb:disconnect exwm-systemtray--connection)
|
||||
(setq exwm-systemtray--connection nil
|
||||
exwm-systemtray--list nil
|
||||
|
|
Loading…
Reference in a new issue