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

Hover state retained on window exit #13

Closed
ghost opened this issue Nov 27, 2022 · 11 comments · Fixed by linebender/glazier#45 or #21
Closed

Hover state retained on window exit #13

ghost opened this issue Nov 27, 2022 · 11 comments · Fixed by linebender/glazier#45 or #21

Comments

@ghost
Copy link

ghost commented Nov 27, 2022

Screen.Recording.2022-11-27.at.23.02.43.mov

I suspect this is not intended behavior? All hover state should be discarded on cursor exiting the window.

@xStrom
Copy link
Member

xStrom commented Dec 3, 2022

Not intended and is not a problem in Druid last I checked. What macOS version do you have?

@ghost
Copy link
Author

ghost commented Dec 3, 2022

macOS Ventura 13.0.

@xStrom
Copy link
Member

xStrom commented Dec 3, 2022

I see you also commented on glazier#38 - does that not fix this issue?

@ghost
Copy link
Author

ghost commented Dec 3, 2022 via email

@longmathemagician
Copy link
Contributor

This is a general druid shell / glazier event issue, the mouse leaving the window does not reset IS_HOT since the button is on the edge of the window. For whatever reason it stops sending mouse events when the cursor is outside the window.

At least on Windows this is actually a minor problem preventing platform-consistent implementation of button state management when you press, move the cursor outside the window, and then return it to the button to release.

@xStrom
Copy link
Member

xStrom commented Dec 3, 2022

That's interesting and certainly sounds like a regression. All of this worked back in 2020 when I implemented it. I also did very extensive testing, with some of those results being reported in druid#828. I should revisit some of this stuff to see what's going on.

@longmathemagician
Copy link
Contributor

Interesting. IIRC you'll only trigger it for isolated widgets (ones not in a layout or other container) or if you miss a mouse move event (eventually an issue for pen/touch support) so it would definitely be an easy regression to miss.

@longmathemagician
Copy link
Contributor

I was able to reproduce this on linux and windows, turns out that mouse leave events were not being received in glazier or handled in xilem. The above draft PRs fix this (for x11) by adding a MouseLeft event. This could alternately be done just using MouseMove although doing so in druid was apparently problematic (linebender/druid#852 (comment)).

@longmathemagician
Copy link
Contributor

Could someone with macOS 13 confirm if this is now fixed?

@Cupnfish
Copy link
Contributor

2022-12-12.11.12.12.mov

Seems to be no problem @longmathemagician

@longmathemagician
Copy link
Contributor

Awesome, thank you!

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 a pull request may close this issue.

3 participants