emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/exwm d225f19 5/5: Fit the *Completions* buffer


From: Chris Feng
Subject: [elpa] externals/exwm d225f19 5/5: Fit the *Completions* buffer
Date: Sat, 30 Jul 2016 02:21:51 +0000 (UTC)

branch: externals/exwm
commit d225f191a908346535cf4525a4c6c56d93a84b31
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>

    Fit the *Completions* buffer
    
    * exwm-workspace.el (exwm-workspace--on-minibuffer-setup): Work around
    the *Completions* buffer not getting fitted problem.
    
    * exwm.el (exwm-enable): Enable `window-resize-pixelwise'.
---
 exwm-workspace.el |   12 +++++++++++-
 exwm.el           |    3 ++-
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/exwm-workspace.el b/exwm-workspace.el
index b2a0cab..b425f92 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -986,7 +986,17 @@ Please check `exwm-workspace--minibuffer-own-frame-p' 
first."
              ;; Exclude non-graphical frames.
              (frame-parameter nil 'exwm-outer-id))
     (add-hook 'post-command-hook #'exwm-workspace--update-minibuffer-height)
-    (exwm-workspace--show-minibuffer)))
+    (exwm-workspace--show-minibuffer))
+  ;; FIXME: This is a temporary fix for the *Completions* buffer not
+  ;;        being correctly fitted by its displaying window.  As with
+  ;;        `exwm-workspace--display-buffer', the problem is caused by
+  ;;        the fact that the minibuffer (rather than the workspace)
+  ;;        frame is the 'selected frame'.  `get-buffer-window' will
+  ;;        fail to retrieve the correct window.  It's likely there are
+  ;;        other related issues.
+  (let ((window (get-buffer-window "*Completions*" exwm-workspace--current)))
+    (when window
+      (fit-window-to-buffer window nil nil nil nil t))))
 
 (defun exwm-workspace--on-minibuffer-exit ()
   "Run in minibuffer-exit-hook to hide the minibuffer container."
diff --git a/exwm.el b/exwm.el
index 7de2297..4c156dc 100644
--- a/exwm.el
+++ b/exwm.el
@@ -679,7 +679,8 @@ This hook is only run when EXWM is started with 
emacsclient.")
      (dolist (i exwm-blocking-subrs)
        (advice-remove i #'exwm--server-eval-at)))
     (_                                  ;enable EXWM
-     (setq frame-resize-pixelwise t)    ;mandatory; before init
+     (setq frame-resize-pixelwise t     ;mandatory; before init
+           window-resize-pixelwise t)
      (add-hook 'window-setup-hook #'exwm-init t)          ;for Emacs
      (add-hook 'after-make-frame-functions #'exwm-init t) ;for Emacs Client
      (add-hook 'kill-emacs-hook #'exwm--server-stop)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]