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

[Bug] focus_follows_cursor doesn't work with touchpads #799

Closed
kurushimee opened this issue Oct 19, 2024 · 10 comments · Fixed by #875
Closed

[Bug] focus_follows_cursor doesn't work with touchpads #799

kurushimee opened this issue Oct 19, 2024 · 10 comments · Fixed by #875
Labels
released type: bug Something isn't working

Comments

@kurushimee
Copy link

kurushimee commented Oct 19, 2024

Describe the bug

The focus_follows_cursor option only works with an external mouse. If moving the cursor by using a touchpad (i.e. a built-in laptop touchpad), this option doesn't work: despite moving the cursor over a different window, the focus doesn't change. If you do the same thing by using a mouse, then the option works correctly and cursor changes window focus.

For clarity, I'm using a Huawei Matebook D15 AMD running Windows 11.

Reproduction

  1. Enable the focus_follows_cursor option.
  2. Try moving the mouse cursor to another window by using a touchpad.
  3. Observe focus staying on the same window, not changing when hovering the cursor over another window.

Stack trace or error logs (if applicable)

No response

Version number

v3.4.0

@kurushimee kurushimee added the type: bug Something isn't working label Oct 19, 2024
@github-project-automation github-project-automation bot moved this to 📬 Needs triage in glazewm Oct 19, 2024
@Ajay-056
Copy link

Ajay-056 commented Nov 4, 2024

Im facing this issue too, Using HP laptop with windows 11. I wont be using external mouse most of the time, found this when using randomly. It would be very helpful if fixed.

@proJM-Coding
Copy link

Can confirm this issue is on v3.5.0
I have no errors though and using a mouse does fix it. I only got this issue when updating to v3.5.0 though.

@HolbyFPV
Copy link
Member

Live-reloading doesn't currently work this feature. Could you confirm that focus_follows_cursor still doesn't work after a full re-launch of GWM?

@kurushimee
Copy link
Author

Sorry, I don't have the ability to confirm it at the moment, but as far as I remember focus_follows_cursor never worked for me with a touchpad, so I think it didn't work even after a re-launch of GWM.

@proJM-Coding
Copy link

Live-reloading doesn't currently work this feature. Could you confirm that focus_follows_cursor still doesn't work after a full re-launch of GWM?

I can confirm that doing a reload, re-launch, reboot and even editing config doesn't fix the issue.

@HolbyFPV
Copy link
Member

Understood. If you have no errors in your logs, I would guess the issue is due to this.

usUsage: HID_USAGE_GENERIC_MOUSE,

Trackpads may need to be registered in a different way. HID_USAGE_GENERIC_POINTER might be the solution, but I'm unsure how to test this theory since I don't have hardware that reproduces the issue.

@bruhmomento124
Copy link

I have a device that reproduces this issue, I attempted to modify HID_USAGE_GENERIC_MOUSE to be HID_USAGE_GENERIC_POINTER but the issue still persists when I compile and run, could be an issue with me though, not too familiar with Rust and Windows API stuff.

If there is anything for me to test please let me know. For context I am using a Lenovo L13 Yoga.

@proJM-Coding
Copy link

I am also using a lenovo device, Thinkpad L14 gen 4.

@bruhmomento124
Copy link

This line appears to be causing the issue, commenting it out makes focus follows cursor work as expected. Seems to be a fix for a different issue so removing it is not a permanent solution, any idea why this is the case?

|| raw_input.header.hDevice.is_invalid()

@github-project-automation github-project-automation bot moved this from 📬 Needs triage to ✅ Done in glazewm Dec 2, 2024
Copy link

github-actions bot commented Dec 3, 2024

🎉 This issue has been resolved in version 3.7.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released type: bug Something isn't working
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

5 participants