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
Replace all X11 mouse events with XI2 equivalents #11235
Replace all X11 mouse events with XI2 equivalents #11235
Conversation
nice! |
Should be fixed now. Thanks for the report. |
Looks to be working for me, thanks! |
1b1c8be
to
65d0cdd
Compare
Thank you! |
This broke scrolling with the mouse wheel for me on X11. Should we revert or is forward fixing doable? |
Can you send the output of |
I try to scroll with my mouse wheel on the I reverted this PR only on Do you need any other debug info? |
Are all mouse events broken or just scrolling? Ie. do you get hover diagnostics and do buttons change colour when hovered? If they don’t, then I think the last commit of this PR “defer xi_select_events to flush” is the problem. If other mouse events still work, then I’m not sure until I debug a bit more. |
I just started testing Zed on Linux, and I'm really happy with it so far (unlike other non-vscode editors I've tried over the last years). Scrolling with the mouse wheel is broken for me too, both with a M575 trackball, and over VNC. I'm using i3wm on Fedora 39. Other mouse events still work fine. |
@pgaskin Does it work prior to the merge of this PR? It’s just interesting because this PR didn’t actually change too much to do with scrolling. |
I tried reverting the commit, and it still doesn't work. I'll try going back to before this PR later (it takes a very long time to build). |
It's just the scrolling. I can click and hover and all of that, but scrolling with the wheel doesn't work. |
Ok, I’ll throw together a branch in a bit that prints some debug information which hopefully will give the information I need to fix it. |
@pgaskin @mrnugget Can you both clone #11679, go to |
Ok, this is quite interesting. VNC is totally broken, because it doesn't seem to have the master pointer, but the more interesting thing is the m575. It seems to have the scroll valuators and is generating scroll deltas, but no scroll is occuring. I've updated #11679 to print a bit more information about what events are actually being generated and passed to zed. Can you pull the changes and run the above again, but with |
Here's mine: scroll_log.txt from hello_world Hope I did it right, because there's nothing to scroll in that window and I just used the mouse wheel. Here's the output when doing
|
This is very, very helpful. It seems like mouse leave events are being generated right after you scroll, which messes with the logic this PR added to get the stored scroll position to zero if the mouse leaves so a large delta isn’t generated on return. I’ll see if I can find out why these events are being emitted. |
@mrnugget I've pushed a potential fix for this problem. Let me know if it works, and if it doesn't, please send the log. I've made it print some more info about the leave events being generated as well. If this doesn't fix it I'll just switch back to normal x11 leave events. |
This PR replaces all pointer events on X11 with their XI2 equivalents, which fixes problems with scroll events not being reported when a mouse button is down. Additionally it closes #11206 by resetting the tracked global scroll valulator position with
None
on a leave event to prevent a large scroll delta if scrolling is done outside the window. Lastly, it resolves the bad window issue kvark was having.Release Notes: