Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly activate windows even if they're not in the iconic state #32

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions exwm.el
Original file line number Diff line number Diff line change
Expand Up @@ -493,23 +493,20 @@ RAW-DATA contains unmarshalled ClientMessage event data."
;; _NET_ACTIVE_WINDOW.
((= type xcb:Atom:_NET_ACTIVE_WINDOW)
(let ((buffer (exwm--id->buffer id))
iconic window)
window)
(if (buffer-live-p buffer)
;; Either an `exwm-mode' buffer (an X window) or a floating frame.
(with-current-buffer buffer
(when (eq exwm--frame exwm-workspace--current)
(if exwm--floating-frame
(select-frame exwm--floating-frame)
(setq iconic (exwm-layout--iconic-state-p))
(when iconic
(setq window (get-buffer-window nil t))
(unless window
;; State change: iconic => normal.
(set-window-buffer (frame-selected-window exwm--frame)
(current-buffer)))
(setq window (frame-selected-window exwm--frame))
(set-window-buffer window (current-buffer)))
;; Focus transfer.
(setq window (get-buffer-window nil t))
(when (or iconic
(not (eq window (selected-window))))
(select-window window)))))
(select-window window))))
;; A workspace.
(dolist (f exwm-workspace--list)
(when (eq id (frame-parameter f 'exwm-outer-id))
Expand Down