[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/exwm 8e3fc36: Adapt for the changes in `window-configur
[elpa] externals/exwm 8e3fc36: Adapt for the changes in `window-configuration-change-hook'
Wed, 10 Aug 2016 11:48:46 +0000 (UTC)
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>
Adapt for the changes in `window-configuration-change-hook'
* exwm-layout.el (exwm-layout--refresh): Accept frame as an optional
(exwm-layout--init): Add `exwm-layout--refresh' to
`window-size-change-functions' when appropriate.
exwm-layout.el | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/exwm-layout.el b/exwm-layout.el
index 2886e43..f5e0e14 100644
@@ -314,11 +314,14 @@ selected by `other-buffer'."
:data (vconcat (append clients-other clients-iconic
-(defun exwm-layout--refresh ()
+(defun exwm-layout--refresh (&optional frame)
- (let ((frame (selected-frame))
- covered-buffers ;EXWM-buffers covered by a new X window.
- vacated-windows ;Windows previously displaying
+ ;; `window-size-change-functions' sets this argument while
+ ;; `window-configuration-change-hook' makes the frame selected.
+ (unless frame
+ (setq frame (selected-frame)))
+ (let (covered-buffers ;EXWM-buffers covered by a new X window.
+ vacated-windows ;Windows previously displaying EXWM-buffers.
(if (not (exwm-workspace--workspace-p frame))
(if (frame-parameter frame 'exwm-outer-id)
@@ -566,6 +569,9 @@ See also `exwm-layout-enlarge-window'."
"Initialize layout module."
;; Auto refresh layout
(add-hook 'window-configuration-change-hook #'exwm-layout--refresh)
+ ;; The behavior of `window-configuration-change-hook' will be changed.
+ (when (fboundp 'window-pixel-width-before-size-change)
+ (add-hook 'window-size-change-functions #'exwm-layout--refresh))
;; Refresh when minibuffer grows
(add-hook 'minibuffer-setup-hook #'exwm-layout--on-minibuffer-setup t)
|[Prev in Thread]
||[Next in Thread]|
- [elpa] externals/exwm 8e3fc36: Adapt for the changes in `window-configuration-change-hook',
Chris Feng <=