-
Notifications
You must be signed in to change notification settings - Fork 18
Focus Retention when switching to (non-EXWM) buffers #4
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
Comments
I also stumble over over focus issues from time to time (in general, maybe not specifically this one). Fixing focus issues has a high priority and I hope that we will make progress there soon. In general it is helpful if you provide a minimal recipe (a minimal Emacs configuration), and figure out precise reproduction steps. As you wrote, the issue only happens in 50% of the cases, so the behavior is likely timing dependent and this makes it a little harder to debug. Maybe @Stebalien has some specific debugging suggestions? |
I have had this exact same issue and my solution was to update libX11 to |
Thank you so much for pointing me there. I read through the issues, but didn't recognize that issue as mine while skimming over it. Closing here in favor of the other one |
I also experience this from time to time. For months I suspected that it was tied to mu4e, but just now it is happening without mu4e and between two Emacs buffers (doc-view mode and org-mode). My libX11 is on version 1.8.7. |
@ArneBab can you try setting (note: this is now set to |
I set it now — will report whether the issue repeats in the next days. Thank you! |
I have the same issues as originally described. When my mouse switches between a window displaying an emacs buffer and a window displaying an exwm buffer, in either direction, the focus isn't always followed. However, when I very slowly move my cursor between the windows, focus does follow as intended. This happens when moving vertically and horizontally. Another case where it does work reliably is if I'm going clockwise or counter-clockwise in a 2x2 layout of interleaving exwm and non-exwm windows, like this:
And if I have a vertical stack of interleaving EXWM + non-EXWM windows, the focus skips over the second buffer from the top if my cursor is going down, and the second buffer from the bottom if my cursor is going up:
So, basically: two of the same type of buffers will always switch focus between each other if there's another kind in-between them; and once both of them have switched, then the other type of buffer will focus properly. Anyway here's what my XELB debug looks like when I switch buffers quickly vs slowly:
I see that there isn't even an event captured by exwm-input when I quickly move my cursor exwm->non-exwm. So, maybe there is a XELB bug? |
Since I set |
Unfortunately, I've never gotten "focus follows mouse" to work properly. I spent some time debugging it and gave up. I'm guessing it works when moving "really slowly" because there's a small border between the two windows and that lets Emacs see the mouse movement evens.
This should be the default in the latest release (0.33). Does it work for you? |
When switching to another window (usually on a different workspace) with an emacs (not EXWM/X) buffer, it happens (50% of cases) that the 'focus' remains on the last window.
This is visible from the cursor color in switched-to window-buffer (a transparent box
)
rather than the full-color active-cursor cursor

More importantly, when in this inactive state, it happens that typing on the keyboard, leads to input-actions on the previous buffer/window (no matter whether it is an EXWM/X buffer or an emacs buffer)! In consequence, the active workspace automatically "switches back" showing the previously active window/workspace/buffer.
Any ideas on how to debug this?
PS 1: For a long time, I suspected that this is the same error as described in #759, but it must be different, since it also happens when switching between emacs-buffers (although less often)
PS 2: Following old #942 I am opening this in this new repo. A big thank you to the maintainer(s) for moving this project forward!
The text was updated successfully, but these errors were encountered: