about summary refs log tree commit diff
path: root/exwm.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2015-08-12T23·54+0800
committerChris Feng <chris.w.feng@gmail.com>2015-08-12T23·54+0800
commit35560a49d6c03f96c1f62bfee72ee667cffadb9e (patch)
treeb4921d7a91147186028fc810209e489141878a13 /exwm.el
parent04e426961736c67046fa3809fc14f1ac027dae77 (diff)
Minor fixes for emacsclient
Diffstat (limited to 'exwm.el')
-rw-r--r--exwm.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/exwm.el b/exwm.el
index 989bf88156b5..d33ab2619044 100644
--- a/exwm.el
+++ b/exwm.el
@@ -590,6 +590,7 @@
   (if (not (eq 'x (framep (or frame (selected-frame)))))
       (exwm--log "Not running under X environment")
     (unless exwm--connection
+      (exwm-enable 'undo)               ;never initialize again
       (setq exwm--connection (xcb:connect-to-socket))
       (set-process-query-on-exit-flag (slot-value exwm--connection 'process)
                                       nil) ;prevent query message on exit
@@ -604,7 +605,6 @@
           ;; Other window manager is running
           (progn (xcb:disconnect exwm--connection)
                  (setq exwm--connection nil)
-                 (exwm-enable 'undo)
                  (exwm--log "Other window manager detected"))
         ;; Initialize ICCCM/EWMH support
         ;; (xcb:icccm:init exwm--connection)
@@ -694,11 +694,11 @@
 
 (defun exwm-enable (&optional undo)
   "Enable/Disable EXWM"
-  (setq frame-resize-pixelwise t)       ;mandatory; before init
   (if (eq undo 'undo)
       (progn (remove-hook 'window-setup-hook 'exwm-init)
              (remove-hook 'after-make-frame-functions 'exwm-init))
-    (add-hook 'window-setup-hook 'exwm-init t)            ;for Emacs
+    (setq frame-resize-pixelwise t)            ;mandatory; before init
+    (add-hook 'window-setup-hook 'exwm-init t) ;for Emacs
     (add-hook 'after-make-frame-functions 'exwm-init t))) ;for Emacs Client
 
 (defun exwm--ido-buffer-window-other-frame (orig-fun buffer)