branch: externals/corfu commit 688170e70a7485fbce364aa53b0704d8e57ea4c0 Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
HACK: Try to fix focus issue on Lucid/Athena toolkit (See #159) Not sure if this works. Testing this for a while. --- corfu.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/corfu.el b/corfu.el index c3cc2d9eca..18199362e1 100644 --- a/corfu.el +++ b/corfu.el @@ -866,7 +866,8 @@ there hasn't been any input, then quit." (corfu--candidates-popup beg) (corfu--preview-current beg end) (corfu--echo-documentation) - (redisplay 'force)) ;; XXX HACK Ensure that popup is redisplayed + (redisplay 'force) ;; XXX HACK Ensure that popup is redisplayed + (x-focus-frame (selected-frame))) ;; XXX HACK Try to fix focus (Lucid/Athena) ;; 4) There are no candidates & corfu-quit-no-match => Confirmation popup. ((and (not corfu--candidates) (pcase-exhaustive corfu-quit-no-match @@ -874,7 +875,8 @@ there hasn't been any input, then quit." ('nil t) ('separator (seq-contains-p (car corfu--input) corfu-separator)))) (corfu--popup-show beg 0 8 '(#("No match" 0 8 (face italic)))) - (redisplay 'force)) ;; XXX HACK Ensure that popup is redisplayed + (redisplay 'force) ;; XXX HACK Ensure that popup is redisplayed + (x-focus-frame (selected-frame))) ;; XXX HACK Try to fix focus (Lucid/Athena) (t (corfu-quit))))) (defun corfu--pre-command ()