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

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

[elpa] externals/corfu 497c8534a2 2/4: Use internal-border-width instead


From: ELPA Syncer
Subject: [elpa] externals/corfu 497c8534a2 2/4: Use internal-border-width instead of child-frame-border-width
Date: Fri, 29 Dec 2023 12:57:42 -0500 (EST)

branch: externals/corfu
commit 497c8534a267ec39ca80c7e27e70fca48c73563c
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Use internal-border-width instead of child-frame-border-width
---
 corfu.el                      | 15 ++++++---------
 extensions/corfu-popupinfo.el |  4 ++--
 2 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/corfu.el b/corfu.el
index ba6b4a98b5..1af5cb6ec7 100644
--- a/corfu.el
+++ b/corfu.el
@@ -325,7 +325,8 @@ See also the settings `corfu-auto-delay', 
`corfu-auto-prefix' and
     (min-width . t)
     (min-height . t)
     (border-width . 0)
-    (child-frame-border-width . 1)
+    (outer-border-width . 0)
+    (internal-border-width . 1)
     (left-fringe . 0)
     (right-fringe . 0)
     (vertical-scroll-bars . nil)
@@ -467,10 +468,9 @@ FRAME is the existing frame."
     ;; Check before applying the setting. Without the check, the frame flickers
     ;; on Mac. We have to apply the face background before adjusting the frame
     ;; parameter, otherwise the border is not updated.
-    (let* ((face (if (facep 'child-frame-border) 'child-frame-border 
'internal-border))
-           (new (face-attribute 'corfu-border :background nil 'default)))
-      (unless (equal (face-attribute face :background frame 'default) new)
-        (set-face-background face new frame)))
+    (let ((new (face-attribute 'corfu-border :background nil 'default)))
+      (unless (equal (face-attribute 'internal-border :background frame 
'default) new)
+        (set-face-background 'internal-border new frame)))
     ;; Reset frame parameters if they changed.  For example `tool-bar-mode'
     ;; overrides the parameter `tool-bar-lines' for every frame, including 
child
     ;; frames.  The child frame API is a pleasure to work with.  It is full of
@@ -480,9 +480,6 @@ FRAME is the existing frame."
                        (lambda (p) (equal (alist-get (car p) params) (cdr p)))
                        `((background-color
                           . ,(face-attribute 'corfu-default :background nil 
'default))
-                         ;; Set `internal-border-width' for Emacs 27
-                         (internal-border-width
-                          . ,(alist-get 'child-frame-border-width 
corfu--frame-parameters))
                          (font . ,(frame-parameter parent 'font))
                          ,@corfu--frame-parameters))))
       (modify-frame-parameters frame reset))
@@ -1027,7 +1024,7 @@ A scroll bar is displayed from LO to LO+BAR."
              ;; parent frame (gh:minad/corfu#261).
              (height (max lh (* (length lines) ch)))
              (edge (window-inside-pixel-edges))
-             (border (alist-get 'child-frame-border-width 
corfu--frame-parameters))
+             (border (alist-get 'internal-border-width 
corfu--frame-parameters))
              (x (max 0 (min (+ (car edge) (- (or (car pos) 0) ml (* cw off) 
border))
                             (- (frame-pixel-width) width))))
              (yb (+ (cadr edge) (window-tab-line-height) (or (cdr pos) 0) lh))
diff --git a/extensions/corfu-popupinfo.el b/extensions/corfu-popupinfo.el
index 803728ad75..8ec30d8ad6 100644
--- a/extensions/corfu-popupinfo.el
+++ b/extensions/corfu-popupinfo.el
@@ -288,7 +288,7 @@ form (X Y WIDTH HEIGHT DIR)."
   (pcase-let*
       ((cw (default-font-width))
        (lh (default-line-height))
-       (border (alist-get 'child-frame-border-width corfu--frame-parameters))
+       (border (alist-get 'internal-border-width corfu--frame-parameters))
        (`(,_pfx ,_pfy ,pfw ,pfh)
         (corfu-popupinfo--frame-geometry (frame-parent corfu--frame)))
        (`(,cfx ,cfy ,cfw ,cfh) (corfu-popupinfo--frame-geometry corfu--frame))
@@ -358,7 +358,7 @@ form (X Y WIDTH HEIGHT DIR)."
           (corfu-popupinfo--hide)
           (setq cand-changed nil coords-changed nil)))
       (when (or cand-changed coords-changed)
-        (pcase-let* ((border (alist-get 'child-frame-border-width 
corfu--frame-parameters))
+        (pcase-let* ((border (alist-get 'internal-border-width 
corfu--frame-parameters))
                      (`(,area-x ,area-y ,area-w ,area-h ,area-d)
                       (corfu-popupinfo--area
                        (if cand-changed



reply via email to

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