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.
This commit is contained in:
Chris Feng 2016-07-21 12:44:05 +08:00
parent 6571bb5761
commit f48b8eafb0
2 changed files with 24 additions and 4 deletions

View file

@ -199,6 +199,12 @@
["Swap workspaces" exwm-workspace-swap] ["Swap workspaces" exwm-workspace-swap]
["Move X window to" exwm-workspace-move-window :keys "C-c C-m"] ["Move X window to" exwm-workspace-move-window :keys "C-c C-m"]
["Move X window from" exwm-workspace-switch-to-buffer] ["Move X window from" exwm-workspace-switch-to-buffer]
["Attach minibuffer" exwm-workspace-attach-minibuffer
(and (exwm-workspace--minibuffer-own-frame-p)
(not (exwm-workspace--minibuffer-attached-p)))]
["Detach minibuffer" exwm-workspace-detach-minibuffer
(and (exwm-workspace--minibuffer-own-frame-p)
(exwm-workspace--minibuffer-attached-p))]
["Switch workspace" exwm-workspace-switch] ["Switch workspace" exwm-workspace-switch]
;; Place this entry at bottom to avoid selecting others by accident. ;; Place this entry at bottom to avoid selecting others by accident.
("Switch to" :filter ("Switch to" :filter

View file

@ -1164,6 +1164,17 @@ Please check `exwm-workspace--minibuffer-own-frame-p' first."
;; If the current workspace is deleted, switch to next one. ;; If the current workspace is deleted, switch to next one.
(when (eq frame exwm-workspace--current) (when (eq frame exwm-workspace--current)
(exwm-workspace-switch nextw))) (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. ;; Update EWMH properties.
(exwm-workspace--update-ewmh-props) (exwm-workspace--update-ewmh-props)
;; Update switch history. ;; Update switch history.
@ -1234,7 +1245,7 @@ applied to all subsequently created X frames."
(setq exwm-workspace--minibuffer (setq exwm-workspace--minibuffer
(make-frame '((window-system . x) (minibuffer . only) (make-frame '((window-system . x) (minibuffer . only)
(left . 10000) (right . 10000) (left . 10000) (right . 10000)
(width . 0) (height . 0) (width . 1) (height . 1)
(internal-border-width . 0) (internal-border-width . 0)
(client . nil)))) (client . nil))))
;; Remove/hide existing frames. ;; Remove/hide existing frames.
@ -1351,9 +1362,12 @@ applied to all subsequently created X frames."
(defun exwm-workspace--post-init () (defun exwm-workspace--post-init ()
"The second stage in the initialization of the workspace module." "The second stage in the initialization of the workspace module."
;; Make the workspaces fullscreen. (when exwm-workspace--client
(dolist (i exwm-workspace--list) ;; Reset the 'fullscreen' frame parameter to make emacsclinet frames
(set-frame-parameter i 'fullscreen 'fullboth)) ;; 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. ;; Wait until all workspace frames are resized.
(with-timeout (1) (with-timeout (1)
(while (< exwm-workspace--fullscreen-frame-count (exwm-workspace--count)) (while (< exwm-workspace--fullscreen-frame-count (exwm-workspace--count))