You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When a non-X window is selected, set _NET_ACTIVE_WINDOW to the current EXWM workspace (i.e., the Emacs frame containing the selected window). This behavior can be tested with, e.g., `xdotool getactivewindow'.
When a non-X window is selected, set _NET_ACTIVE_WINDOW to the current
EXWM workspace (i.e., the Emacs frame containing the selected window).
This behavior can be tested with, e.g., `xdotool getactivewindow'.
* exwm-input.el (exwm-input--set-active-window): The window ID is now
mandatory.
(exwm--input-update-focus): When focusing on a workspace, set the active
window to the workspace's window ID. (#77)
The reason will be displayed to describe this comment to others. Learn more.
Why use exwm-workspace--current here instead of frame, since we called x-focus-frame on frame? Should be the same, right? Instead of the or with xcb:Window:None you could also preserve the old exwm-input--set-active-window calling convention which allows a nil argument, such that the change is overall more minimal.
The reason will be displayed to describe this comment to others. Learn more.
This case is only supposed to cover switching focus within a workspace, not between workspaces. However, from my testing, we hit this case when switching workspaces anyways so there's no need to update _NET_ACTIVE_WINDOW from the other case.
I've tested this with multiple workspaces, multiple monitors, floating windows, etc. so I think I've covered most cases. Posframe windows that take focus (e.g., vertico-posframe) treat the current workspace as focused but, IMO, that's fine.
There are two other places in exwm.el and exwm-workspace.el where x-focus-frame is used. Would they also need a similar treatment? Most likely not given that exwm-input--set-active-window is not already used there?
exwm--on-net-active-window is reacting to _NET_ACTIVE_WINDOW.
I'm not entirely sure why this doesn't need to be called in exwm-workspace-switch, but it seems to work. My guess is that exwm-input--update-focus gets called because we're focusing a new window. From what I can tell, that x-frame-focus call isn't actually necessary either. The git history indicates otherwise but the focus switching logic has changed significantly since then.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a non-X window is selected, set _NET_ACTIVE_WINDOW to the current EXWM workspace (i.e., the Emacs frame containing the selected window). This behavior can be tested with, e.g., `xdotool getactivewindow'.
(exwm--input-update-focus): When focusing on a workspace, set the active window to the workspace's window ID. (Setting _NET_ACTIVE_WINDOW to emacs when non-EXWM buffer in focus #77)