Helm/EXWM: Fix loss of focus
parent
9ad4f9e26c
commit
a4fca96b09
|
@ -18,13 +18,7 @@
|
||||||
;; TODO: Write a emacs-buffers helm source to filter out EXWM buffers from buffer list.
|
;; TODO: Write a emacs-buffers helm source to filter out EXWM buffers from buffer list.
|
||||||
;; Write an all-exwm buffer source.
|
;; Write an all-exwm buffer source.
|
||||||
|
|
||||||
;; TODO: s-w s-w loses focus.
|
;; REVIEW: Helm buffer does not die? Seems to be fixed.
|
||||||
;; We don't get the expected error:
|
|
||||||
;; "helm: Error: Trying to run helm within a running helm session"
|
|
||||||
;; Instead, another s-w shows
|
|
||||||
;; "Aborting an helm session running in background"
|
|
||||||
|
|
||||||
;; TODO: Helm buffer does not die?
|
|
||||||
|
|
||||||
;; TODO: kill-persistent is not persistent.
|
;; TODO: kill-persistent is not persistent.
|
||||||
|
|
||||||
|
@ -98,6 +92,10 @@ If there is none, start PROGRAM.
|
||||||
If PROGRAM is nil, it defaults to CLASS.
|
If PROGRAM is nil, it defaults to CLASS.
|
||||||
|
|
||||||
With prefix argument or if OTHER-WINDOW is non-nil, open in other window."
|
With prefix argument or if OTHER-WINDOW is non-nil, open in other window."
|
||||||
|
;; If current window is not in `exwm-mode' we switch to it. Therefore we must
|
||||||
|
;; also make sure that current window is not a Helm buffer, otherwise calling
|
||||||
|
;; this function will lose focus in Helm.
|
||||||
|
(unless helm-alive-p
|
||||||
(setq program (or program class)
|
(setq program (or program class)
|
||||||
other-window (or other-window current-prefix-arg))
|
other-window (or other-window current-prefix-arg))
|
||||||
(if (and (eq major-mode 'exwm-mode)
|
(if (and (eq major-mode 'exwm-mode)
|
||||||
|
@ -115,7 +113,7 @@ With prefix argument or if OTHER-WINDOW is non-nil, open in other window."
|
||||||
(if last
|
(if last
|
||||||
(funcall (if other-window 'switch-to-buffer-other-window 'switch-to-buffer) (car last))
|
(funcall (if other-window 'switch-to-buffer-other-window 'switch-to-buffer) (car last))
|
||||||
(when other-window (select-window (split-window-sensibly)))
|
(when other-window (select-window (split-window-sensibly)))
|
||||||
(start-process-shell-command program nil program)))))
|
(start-process-shell-command program nil program))))))
|
||||||
|
|
||||||
(defun helm-exwm-switch-browser ()
|
(defun helm-exwm-switch-browser ()
|
||||||
"Switch to some `browse-url-generic-program' windows.
|
"Switch to some `browse-url-generic-program' windows.
|
||||||
|
|
Loading…
Reference in New Issue