[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/exwm f48b8ea 2/5: Minor fixes
From: |
Chris Feng |
Subject: |
[elpa] externals/exwm f48b8ea 2/5: Minor fixes |
Date: |
Thu, 21 Jul 2016 05:06:45 +0000 (UTC) |
branch: externals/exwm
commit f48b8eafb0b8f8afab0d42459a29f605cf452daa
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>
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.
---
exwm-core.el | 6 ++++++
exwm-workspace.el | 22 ++++++++++++++++++----
2 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/exwm-core.el b/exwm-core.el
index f0508c6..09e1658 100644
--- a/exwm-core.el
+++ b/exwm-core.el
@@ -199,6 +199,12 @@
["Swap workspaces" exwm-workspace-swap]
["Move X window to" exwm-workspace-move-window :keys "C-c C-m"]
["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]
;; Place this entry at bottom to avoid selecting others by accident.
("Switch to" :filter
diff --git a/exwm-workspace.el b/exwm-workspace.el
index 80a7cbd..e33144e 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))