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

set_cursor followup #112

Open
MaxJLevien opened this issue Aug 9, 2019 · 1 comment
Open

set_cursor followup #112

MaxJLevien opened this issue Aug 9, 2019 · 1 comment
Labels
architecture changes the architecture, usually breaking discussion needs feedback and ideas

Comments

@MaxJLevien
Copy link

This is a followup to concerns raised in #87.

There might be a second issue here (my mac is in the shop because the butterfly keyboard got a crumb in it, so I can't test), which is whether NSCursor::set leaks globally into other app windows. If so, we should probably change it so there's a single rect that covers the entire window (or, to be more precise, the area of the NSView that serves as the root of the druid widget hiearchy, when thinking about VST guest use cases). I think that change can be made at the shell level without affecting event flow or API, if needed.

@cmyr observed that NSCursor.set can clobber the global cursor.

The Apple docs are confusing. If you set up these tracking areas, and it drills down to Cocoa calling your view's cursorUpdate method, of which their suggested impl (see Listing 6-4) is to just call NSCursor::set. So it's unclear if this is really what's causing the clobbering of the global cursor, or whether it might be something else such as a grab that's not being let go.

There's also the performance issue of if we should call the set_cursor every time, or only when the cursor has actually changed. This is subtle, because of the need to track when the mouse has left the window on Windows. See discussion in #87 for details.

Investigate the clobbering of the global cursor on mac, and consider the performance improvement.

@cmyr
Copy link
Member

cmyr commented Aug 9, 2019

I have a bunch of thoughts on this, I'm not especially happy with the current API; need to write up a general 'mouse improvements' issue at some point, i've been putting that off.

@luleyleo luleyleo added architecture changes the architecture, usually breaking discussion needs feedback and ideas labels Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architecture changes the architecture, usually breaking discussion needs feedback and ideas
Projects
None yet
Development

No branches or pull requests

3 participants