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

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

[elpa] externals/corfu-doc d2260b04d7 04/95: Fix doc frame border missin


From: ELPA Syncer
Subject: [elpa] externals/corfu-doc d2260b04d7 04/95: Fix doc frame border missing problem
Date: Tue, 19 Jul 2022 15:57:59 -0400 (EDT)

branch: externals/corfu-doc
commit d2260b04d75dd30f4d640c56bb12621a735dfbce
Author: Tian Yuwei <ibluefocus@outlook.com>
Commit: Tian Yuwei <ibluefocus@outlook.com>

    Fix doc frame border missing problem
---
 corfu-doc.el | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/corfu-doc.el b/corfu-doc.el
index cdf4c13f9b..c33b6c5e65 100644
--- a/corfu-doc.el
+++ b/corfu-doc.el
@@ -132,15 +132,16 @@
     ;; XXX HACK Setting the same frame-parameter/face-background is not a nop 
(BUG!).
     ;; Check explicitly before applying the setting.
     ;; Without the check, the frame flickers on Mac.
-    ;; XXX HACK We have to apply the face background before adjusting the 
frame parameter,
-    ;; otherwise the border is not updated (BUG!).
     (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 corfu-doc--frame 
'default) new)
-       (set-face-background face new corfu-doc--frame)))
-    (let ((new (face-attribute 'corfu-default :background nil 'default)))
-      (unless (equal (frame-parameter corfu-doc--frame 'background-color) new)
-       (set-frame-parameter corfu-doc--frame 'background-color new)))
+              (internal-border-color (face-attribute 'corfu-border :background 
nil 'default))
+           (bg-color (face-attribute 'corfu-default :background nil 'default)))
+      (unless (and (equal (face-attribute face :background corfu-doc--frame 
'default)
+                          internal-border-color)
+                   (equal (frame-parameter corfu--frame 'background-color) 
bg-color))
+           (set-face-background face internal-border-color corfu-doc--frame)
+        ;; XXX HACK We have to apply the face background before adjusting the 
frame parameter,
+        ;; otherwise the border is not updated (BUG!).
+        (set-frame-parameter corfu-doc--frame 'background-color bg-color)))
     (let ((win (frame-root-window corfu-doc--frame)))
       (set-window-buffer win buffer)
       ;; Mark window as dedicated to prevent frame reuse (#60)



reply via email to

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