about summary refs log tree commit diff
path: root/exwm-workspace.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2016-07-21T04·44+0800
committerChris Feng <chris.w.feng@gmail.com>2016-07-21T04·44+0800
commitf48b8eafb0b8f8afab0d42459a29f605cf452daa (patch)
treeabbf86ebee5fc77665a30b4abf754b0cfd4885a1 /exwm-workspace.el
parent6571bb5761241be16c49f4b9af4314851b36eb18 (diff)
Minor fixes
* exwm-core.el (exwm-mode-menu, exwm-mode-map): Add workspace
attach/detach commands.

* exwm-workspace.el (exwm-workspace--add-frame-as-workspace):
Cleanup containers.

* exwm-workspace.el (exwm-workspace--update-ewmh-props): Create the
frame in size 1x1 (Lucid build does no support zero sized frames).

* exwm-workspace.el (exwm-workspace--post-init): Reset the 'fullscreen'
frame parameter for emacsclient.
Diffstat (limited to 'exwm-workspace.el')
-rw-r--r--exwm-workspace.el22
1 files changed, 18 insertions, 4 deletions
diff --git a/exwm-workspace.el b/exwm-workspace.el
index 80a7cbd215..e33144ec6a 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -1164,6 +1164,17 @@ Please check `exwm-workspace--minibuffer-own-frame-p' first."
       ;; If the current workspace is deleted, switch to next one.
       (when (eq frame exwm-workspace--current)
         (exwm-workspace-switch nextw)))
+    ;; Reparent out the frame.
+    (xcb:+request exwm--connection
+        (make-instance 'xcb:ReparentWindow
+                       :window (frame-parameter frame 'exwm-outer-id)
+                       :parent exwm--root
+                       :x 0
+                       :y 0))
+    ;; Destroy the containers.
+    (xcb:+request exwm--connection
+        (make-instance 'xcb:DestroyWindow
+                       :window (frame-parameter frame 'exwm-workspace)))
     ;; Update EWMH properties.
     (exwm-workspace--update-ewmh-props)
     ;; Update switch history.
@@ -1234,7 +1245,7 @@ applied to all subsequently created X frames."
       (setq exwm-workspace--minibuffer
             (make-frame '((window-system . x) (minibuffer . only)
                           (left . 10000) (right . 10000)
-                          (width . 0) (height . 0)
+                          (width . 1) (height . 1)
                           (internal-border-width . 0)
                           (client . nil))))
       ;; Remove/hide existing frames.
@@ -1351,9 +1362,12 @@ applied to all subsequently created X frames."
 
 (defun exwm-workspace--post-init ()
   "The second stage in the initialization of the workspace module."
-  ;; Make the workspaces fullscreen.
-  (dolist (i exwm-workspace--list)
-    (set-frame-parameter i 'fullscreen 'fullboth))
+  (when exwm-workspace--client
+    ;; Reset the 'fullscreen' frame parameter to make emacsclinet frames
+    ;; fullscreen (even without the RandR module enabled).
+    (dolist (i exwm-workspace--list)
+      (set-frame-parameter i 'fullscreen nil)
+      (set-frame-parameter i 'fullscreen 'fullboth)))
   ;; Wait until all workspace frames are resized.
   (with-timeout (1)
     (while (< exwm-workspace--fullscreen-frame-count (exwm-workspace--count))