fix(exwm): troubles with posframe

This commit is contained in:
Pavel Korytov 2022-03-30 14:48:22 +03:00
parent f22856746a
commit 6402061319
2 changed files with 39 additions and 32 deletions

View file

@ -288,13 +288,17 @@ DIR is either 'left or 'right."
focus-follows-mouse)))
(defun my/restore-posframe (&rest args)
(mapc
(lambda (var)
(kill-local-variable var)
(setf (symbol-value var) t))
'(exwm-workspace-warp-cursor
mouse-autoselect-window
focus-follows-mouse)))
(run-with-timer
0.25
nil
(lambda ()
(mapc
(lambda (var)
(kill-local-variable var)
(setf (symbol-value var) t))
'(exwm-workspace-warp-cursor
mouse-autoselect-window
focus-follows-mouse)))))
(advice-add #'posframe--create-posframe :after #'my/setup-posframe)
(advice-add #'ivy-posframe-cleanup :after #'my/restore-posframe)

View file

@ -792,13 +792,16 @@ Not sure about that. The cursor occasionally changes focus when I'm exiting posf
focus-follows-mouse)))
(defun my/restore-posframe (&rest args)
(mapc
(lambda (var)
(kill-local-variable var)
(setf (symbol-value var) t))
'(exwm-workspace-warp-cursor
mouse-autoselect-window
focus-follows-mouse)))
(run-with-timer
0.25
(lambda ()
(mapc
(lambda (var)
(kill-local-variable var)
(setf (symbol-value var) t))
'(exwm-workspace-warp-cursor
mouse-autoselect-window
focus-follows-mouse)))))
(advice-add #'posframe--create-posframe :after #'my/setup-posframe)
(advice-add #'ivy-posframe-cleanup :after #'my/restore-posframe)