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

Fix gratuitous pointer jump #1481

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

falsifian
Copy link

I have pointer_follows_focus set. Normally when I focus a window by moving the pointer to it, the pointer doesn't warp, which is good: I only want it to warp when something else caused the focus to change. However, if the pointer crossed from one monitor to another, it would warp to the middle of the newly focussed window, which was annoying.

With some debugging I figured out focus_in was being triggered with e->event == root, causing focus_in to focus the focussed node a second time. I don't know enough about X to understand why this event was generated; perhaps a real fix would address that as the root issue (no pun intended).

Instead, this fix simply unsets pointer_follows_focus in this case. I briefly tested the repro instructions at #1378 (comment) to confirm the original bug behind the code I modified did not come back.

This fixes a bug where if the pointer crossed from one monitor to
another with pointer_follows_focus set, it would warp to the middle
of the newly focussed window, even though normally pointer_follows_focus
doesn't have an effect when the focus was due to pointer movement
in the first place.
@falsifian
Copy link
Author

Ping. I've been using this patch since I posted it, along with #1480, and both seem to be working fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant