mirror of
https://github.com/emacs-exwm/exwm.git
synced 2024-11-27 14:57:59 +01:00
Force using visible buffers in `other-buffer'
* exwm-floating.el (exwm-floating--set-floating): * exwm-workspace.el (exwm-workspace-move-window): Buffers visible on other frames should be treated as invisible. One side effect is visible buffers on the current frame is also taken into account.
This commit is contained in:
parent
9105f23121
commit
b4517fbfa0
2 changed files with 4 additions and 3 deletions
|
@ -82,8 +82,9 @@ context of the corresponding buffer.")
|
||||||
(defun exwm-floating--set-floating (id)
|
(defun exwm-floating--set-floating (id)
|
||||||
"Make window ID floating."
|
"Make window ID floating."
|
||||||
(let ((window (get-buffer-window (exwm--id->buffer id))))
|
(let ((window (get-buffer-window (exwm--id->buffer id))))
|
||||||
(when window ;window in non-floating state
|
(when window
|
||||||
(set-window-buffer window (other-buffer)))) ;hide it first
|
;; Hide the non-floating X window first.
|
||||||
|
(set-window-buffer window (other-buffer nil t))))
|
||||||
(let* ((original-frame exwm-workspace--current)
|
(let* ((original-frame exwm-workspace--current)
|
||||||
;; Create new frame
|
;; Create new frame
|
||||||
(frame (with-current-buffer
|
(frame (with-current-buffer
|
||||||
|
|
|
@ -747,7 +747,7 @@ INDEX must not exceed the current number of workspaces."
|
||||||
exwm--floating-frame)))))
|
exwm--floating-frame)))))
|
||||||
;; Move the X window container.
|
;; Move the X window container.
|
||||||
(set-window-buffer (get-buffer-window (current-buffer) t)
|
(set-window-buffer (get-buffer-window (current-buffer) t)
|
||||||
(other-buffer))
|
(other-buffer nil t))
|
||||||
(unless (eq frame exwm-workspace--current)
|
(unless (eq frame exwm-workspace--current)
|
||||||
;; Clear the 'exwm-selected-window' frame parameter.
|
;; Clear the 'exwm-selected-window' frame parameter.
|
||||||
(set-frame-parameter frame 'exwm-selected-window nil))
|
(set-frame-parameter frame 'exwm-selected-window nil))
|
||||||
|
|
Loading…
Reference in a new issue