mirror of
https://github.com/ch11ng/exwm.git
synced 2024-11-23 19:47:58 +01:00
Fix exwm-workspace-switch-to-buffer
* exwm-workspace.el (exwm-workspace-switch-to-buffer): Select the floating frame when switching to a floating X window buffer.
This commit is contained in:
parent
b400ae6eba
commit
84a9041b20
1 changed files with 13 additions and 4 deletions
|
@ -399,10 +399,19 @@ The optional FORCE option is for internal use only."
|
|||
(rename-buffer (concat " " (buffer-name))))))))))
|
||||
(when buffer-or-name
|
||||
(with-current-buffer buffer-or-name
|
||||
(if (and (eq major-mode 'exwm-mode)
|
||||
(not (eq exwm--frame exwm-workspace--current)))
|
||||
(if (eq major-mode 'exwm-mode)
|
||||
;; EXWM buffer.
|
||||
(if (eq exwm--frame exwm-workspace--current)
|
||||
;; On the current workspace.
|
||||
(if (not exwm--floating-frame)
|
||||
(switch-to-buffer buffer-or-name)
|
||||
;; Select the floating frame.
|
||||
(select-frame-set-input-focus exwm--floating-frame)
|
||||
(select-window (frame-root-window exwm--floating-frame)))
|
||||
;; On another workspace.
|
||||
(exwm-workspace-move-window exwm-workspace-current-index
|
||||
exwm--id)
|
||||
exwm--id))
|
||||
;; Ordinary buffer.
|
||||
(switch-to-buffer buffer-or-name)))))
|
||||
|
||||
(defun exwm-workspace-rename-buffer (newname)
|
||||
|
|
Loading…
Reference in a new issue