[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/exwm e9e476c 2/6: Merge branch 'fjl-fix-resize-minibuff
From: |
Chris Feng |
Subject: |
[elpa] externals/exwm e9e476c 2/6: Merge branch 'fjl-fix-resize-minibuffer' |
Date: |
Sun, 07 Feb 2016 03:41:53 +0000 |
branch: externals/exwm
commit e9e476c4dee299a9dea3de11c286e0c93f86ce79
Merge: 97daba2 0006523
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>
Merge branch 'fjl-fix-resize-minibuffer'
---
exwm-input.el | 2 +-
exwm-layout.el | 7 ++++---
exwm-randr.el | 5 +++--
exwm-workspace.el | 13 +++++++++----
4 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/exwm-input.el b/exwm-input.el
index 757efb7..85be1ef 100644
--- a/exwm-input.el
+++ b/exwm-input.el
@@ -111,7 +111,7 @@ It's updated in several occasions, and only used by
`exwm-input--set-focus'.")
(exwm-input--set-focus exwm--id)
;; Adjust stacking orders
(when exwm--floating-frame
- (if (memq exwm-workspace-minibuffer-position '(top bottom))
+ (if (exwm-workspace--minibuffer-own-frame-p)
;; Put this floating X window just below the minibuffer.
(xcb:+request exwm--connection
(make-instance 'xcb:ConfigureWindow
diff --git a/exwm-layout.el b/exwm-layout.el
index 0dc5e1a..871438f 100644
--- a/exwm-layout.el
+++ b/exwm-layout.el
@@ -203,8 +203,9 @@
(id (frame-parameter frame 'exwm-outer-id))
(workspace (frame-parameter frame 'exwm-workspace)))
(with-slots (x y width height) geometry
- (when (eq frame exwm-workspace--current)
- (exwm-workspace--resize-minibuffer width height))
+ (when (and (eq frame exwm-workspace--current)
+ (exwm-workspace--minibuffer-own-frame-p))
+ (exwm-workspace--resize-minibuffer-frame width height))
(exwm-layout--resize-container id workspace x y width height)
(xcb:flush exwm--connection))))
@@ -395,7 +396,7 @@ See also `exwm-layout-enlarge-window'."
"Initialize layout module."
;; Auto refresh layout
(add-hook 'window-configuration-change-hook #'exwm-layout--refresh)
- (unless (memq exwm-workspace-minibuffer-position '(top bottom))
+ (unless (exwm-workspace--minibuffer-own-frame-p)
;; Refresh when minibuffer grows
(add-hook 'minibuffer-setup-hook #'exwm-layout--on-minibuffer-setup t)
(run-with-idle-timer 0 t #'exwm-layout--on-echo-area-change t)
diff --git a/exwm-randr.el b/exwm-randr.el
index 7e0d9ba..51161a4 100644
--- a/exwm-randr.el
+++ b/exwm-randr.el
@@ -103,8 +103,9 @@
(frame-parameter frame
'exwm-workspace)
x y width height)
- (when (eq frame exwm-workspace--current)
- (exwm-workspace--resize-minibuffer width height))
+ (when (and (eq frame exwm-workspace--current)
+ (exwm-workspace--minibuffer-own-frame-p))
+ (exwm-workspace--resize-minibuffer-frame width height))
(setq workareas
(nconc workareas (list x y width (- height
workarea-offset)))
diff --git a/exwm-workspace.el b/exwm-workspace.el
index 1c23ca0..b166733 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -111,11 +111,16 @@ Value nil means to use the default position which is
fixed at bottom, while
(defvar exwm-workspace--display-echo-area-timer nil
"Timer for auto-hiding echo area.")
-(defun exwm-workspace--resize-minibuffer (&optional width height)
+(defun exwm-workspace--minibuffer-own-frame-p ()
+ "Reports whether the minibuffer is displayed in its own frame."
+ (memq exwm-workspace-minibuffer-position '(top bottom)))
+
+(defun exwm-workspace--resize-minibuffer-frame (&optional width height)
"Resize minibuffer (and its container) to fit the size of workspace.
If WIDTH and HEIGHT of the workspace is not specified, they're get from the
workspace frame."
+ (cl-assert (exwm-workspace--minibuffer-own-frame-p))
(let ((y (if (eq exwm-workspace-minibuffer-position 'top)
0
(- (or height (frame-pixel-height exwm-workspace--current))
@@ -168,7 +173,7 @@ The optional FORCE option is for internal use only."
;; Close the (possible) active minibuffer
(when (active-minibuffer-window)
(run-with-idle-timer 0 nil (lambda () (abort-recursive-edit))))
- (if (not (memq exwm-workspace-minibuffer-position '(top bottom)))
+ (if (not (exwm-workspace--minibuffer-own-frame-p))
(setq default-minibuffer-frame frame)
;; Resize/reposition the minibuffer frame
(xcb:+request exwm--connection
@@ -178,7 +183,7 @@ The optional FORCE option is for internal use only."
'exwm-container)
:parent (frame-parameter frame 'exwm-workspace)
:x 0 :y 0))
- (exwm-workspace--resize-minibuffer))
+ (exwm-workspace--resize-minibuffer-frame))
;; Hide windows in other workspaces by preprending a space
(unless exwm-workspace-show-all-buffers
(dolist (i exwm--id-buffer-alist)
@@ -459,7 +464,7 @@ This functions is modified from
`display-buffer-reuse-window' and
(0 (y-or-n-p prompt))
(x (yes-or-no-p (format "[EXWM] %d window%s currently alive. %s"
x (if (= x 1) "" "s") prompt))))))
- (if (not (memq exwm-workspace-minibuffer-position '(top bottom)))
+ (if (not (exwm-workspace--minibuffer-own-frame-p))
;; Initialize workspaces with minibuffers.
(progn
(setq exwm-workspace--list (frame-list))
- [elpa] externals/exwm updated (97daba2 -> fb9bfd2), Chris Feng, 2016/02/06
- [elpa] externals/exwm 3d643fa 3/6: Remove an assertion, Chris Feng, 2016/02/06
- [elpa] externals/exwm fb9bfd2 6/6: Eliminate compilation warnings, Chris Feng, 2016/02/06
- [elpa] externals/exwm 0006523 1/6: Resize minibuffer only when it's in its own frame, Chris Feng, 2016/02/06
- [elpa] externals/exwm e9e476c 2/6: Merge branch 'fjl-fix-resize-minibuffer',
Chris Feng <=
- [elpa] externals/exwm e2edf81 4/6: Add some useful key bindings, Chris Feng, 2016/02/06
- [elpa] externals/exwm 15cdf8f 5/6: Unmanage X windows on exit, Chris Feng, 2016/02/06