summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2021-07-17 12:10:22 +0200
committerDaniel Mendler <mail@daniel-mendler.de>2021-07-17 12:10:22 +0200
commitaee555ea7de0b74906c014c5754c8c6fb2a0c44b (patch)
tree3d14a0a1b4140c95978cba621a96795ad80607aa
parent155af8de3e75f442beaf2bc1b44b9abcbc367ff0 (diff)
Document another bug, frame border is not updated appropriately
-rw-r--r--corfu.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/corfu.el b/corfu.el
index 4417154..534fd14 100644
--- a/corfu.el
+++ b/corfu.el
@@ -322,14 +322,15 @@ filter string with spaces is allowed."
;; 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.
- ;; With the check, the inner frame sometimes does not get updated sometimes (BUG!).
- (let ((new (face-attribute 'corfu-background :background)))
- (unless (equal (frame-parameter corfu--frame 'background-color) new)
- (set-frame-parameter corfu--frame 'background-color new)))
+ ;; 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)))
(unless (equal (face-attribute face :background corfu--frame) new)
(set-face-background face new corfu--frame)))
+ (let ((new (face-attribute 'corfu-background :background)))
+ (unless (equal (frame-parameter corfu--frame 'background-color) new)
+ (set-frame-parameter corfu--frame 'background-color new)))
(set-window-buffer (frame-root-window corfu--frame) buffer)
;; XXX HACK Make the frame invisible before moving the popup from above to below the line in
;; order to avoid flicker.