emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/exwm 4f7abf4 04/14: Cleanup exwm-manage on exit


From: Chris Feng
Subject: [elpa] externals/exwm 4f7abf4 04/14: Cleanup exwm-manage on exit
Date: Thu, 8 Mar 2018 12:08:06 -0500 (EST)

branch: externals/exwm
commit 4f7abf4bfd41932fe23ce3e9544b8c425f1b2cd3
Author: Adrián Medraño Calvo <address@hidden>
Commit: Adrián Medraño Calvo <address@hidden>

    Cleanup exwm-manage on exit
    
    * exwm-manage.el (exwm-manage--unmanage-window): Map windows when
    quitting.
    (exwm-manage--exit): Remap all windows.
    
    * exwm.el (exwm--exit): Reorder deinitialization sequence so that
    windows are reparented before the workspaces are removed.
---
 exwm-manage.el | 13 +++++++++++--
 exwm.el        |  2 +-
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/exwm-manage.el b/exwm-manage.el
index b5c3f58..cb2bf28 100644
--- a/exwm-manage.el
+++ b/exwm-manage.el
@@ -361,12 +361,17 @@ manager is shutting down."
           (xcb:+request exwm--connection
               (make-instance 'xcb:DeleteProperty
                              :window id :property xcb:Atom:WM_STATE))
-          (unless (eq withdraw-only 'quit)
+          (cond
+           ((eq withdraw-only 'quit)
+            ;; Remap the window when exiting.
+            (xcb:+request exwm--connection
+                (make-instance 'xcb:MapWindow :window id)))
+           (t
             ;; Remove _NET_WM_DESKTOP.
             (xcb:+request exwm--connection
                 (make-instance 'xcb:DeleteProperty
                                :window id
-                               :property xcb:Atom:_NET_WM_DESKTOP))))
+                               :property xcb:Atom:_NET_WM_DESKTOP)))))
         (when exwm--floating-frame
           ;; Unmap the floating frame before destroying its container.
           (let ((window (frame-parameter exwm--floating-frame 'exwm-outer-id))
@@ -670,6 +675,10 @@ border-width: %d; sibling: #x%x; stack-mode: %d"
 
 (defun exwm-manage--exit ()
   "Exit the manage module."
+  (dolist (pair exwm--id-buffer-alist)
+    (exwm-manage--unmanage-window (car pair) 'quit))
+  (remove-hook 'after-make-frame-functions #'exwm-manage--add-frame)
+  (remove-hook 'delete-frame-functions #'exwm-manage--remove-frame)
   (setq exwm-manage--_MOTIF_WM_HINTS nil))
 
 
diff --git a/exwm.el b/exwm.el
index 0387426..f80af05 100644
--- a/exwm.el
+++ b/exwm.el
@@ -739,8 +739,8 @@
   (run-hooks 'exwm-exit-hook)
   ;; Exit modules.
   (exwm-input--exit)
-  (exwm-workspace--exit)
   (exwm-manage--exit)
+  (exwm-workspace--exit)
   (exwm-floating--exit)
   (exwm-layout--exit)
   (exwm--exit-icccm-ewmh))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]