mirror of
https://github.com/emacs-exwm/exwm.git
synced 2024-11-23 21:17:59 +01:00
Fixes for manage/unmanage window
* Make sure `exwm-manage--manage-window-queue` is cleaned * Improve input focus handling after unmanaging a window * Remove a redundant call to `exwm-layout--show`
This commit is contained in:
parent
14628a940c
commit
3b9d0dd921
2 changed files with 13 additions and 4 deletions
|
@ -199,7 +199,6 @@
|
|||
exwm--frame exwm-workspace--current))
|
||||
(select-frame exwm-workspace--current t)
|
||||
(set-window-buffer nil buffer)
|
||||
(exwm-layout--show id)
|
||||
(exwm-input--set-focus id))
|
||||
(setq exwm-input--focus-lock nil))
|
||||
|
||||
|
|
|
@ -61,9 +61,11 @@ corresponding buffer.")
|
|||
(make-instance 'xcb:ChangeWindowAttributes
|
||||
:window id :value-mask xcb:CW:EventMask
|
||||
:event-mask exwm--client-event-mask))
|
||||
(delq id exwm-manage--manage-window-queue) ;cleanup
|
||||
(setq exwm-manage--manage-window-queue
|
||||
(delq id exwm-manage--manage-window-queue)) ;cleanup
|
||||
(throw 'return 'dead))
|
||||
(delq id exwm-manage--manage-window-queue) ;cleanup (late enough)
|
||||
(setq exwm-manage--manage-window-queue
|
||||
(delq id exwm-manage--manage-window-queue)) ;cleanup (late enough)
|
||||
(with-current-buffer (generate-new-buffer "*EXWM*")
|
||||
(push `(,id . ,(current-buffer)) exwm--id-buffer-alist)
|
||||
(exwm-mode)
|
||||
|
@ -193,7 +195,15 @@ corresponding buffer.")
|
|||
(let ((floating exwm--floating-frame))
|
||||
(kill-buffer)
|
||||
(when floating
|
||||
(select-frame-set-input-focus exwm-workspace--current)))))))
|
||||
(if (eq 'exwm-mode
|
||||
(with-current-buffer
|
||||
(window-buffer
|
||||
(frame-first-window exwm-workspace--current))
|
||||
major-mode))
|
||||
;; Input focus is to be set on a window
|
||||
(x-focus-frame exwm-workspace--current)
|
||||
;; Set input focus on a frame
|
||||
(select-frame-set-input-focus exwm-workspace--current))))))))
|
||||
|
||||
(defun exwm-manage--scan ()
|
||||
"Search for existing windows and try to manage them."
|
||||
|
|
Loading…
Reference in a new issue