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

[macOS][nativewindowing] Event location only makes sense for mouse ev… #23630

Merged
merged 4 commits into from
Aug 24, 2023

Conversation

enen92
Copy link
Member

@enen92 enen92 commented Aug 17, 2023

…ents

Description

Currently we are ignoring any events if the location does not have a window bound to the event or even if the event coordinates are negative. This happens when, for example, the mouse is outside of the window bounds or when triggering keypresses with the mouse outside of the window...

Apart from calculating the location for any kind of event that doesn't necessarily need it (waste of resources), we are also ignoring other kind of events. For example, media keys (systemdefined) do not trigger the respective event (wip). Keypresses are only interpreted if the mouse is within the window...that also doesn't make sense and affects the user experience.

@kambala-decapitator it'd be nice if you could have a quick look. I'd like to have this in alpha3

@enen92 enen92 added this to the Omega 21.0 Alpha 3 milestone Aug 17, 2023
@enen92 enen92 force-pushed the macos_limitlocationtomouse branch 4 times, most recently from 5712eec to caf9d61 Compare August 23, 2023 15:22
@enen92 enen92 closed this Aug 23, 2023
@enen92 enen92 reopened this Aug 23, 2023
xbmc/windowing/osx/WinEventsOSXImpl.mm Outdated Show resolved Hide resolved
xbmc/windowing/osx/WinEventsOSXImpl.mm Outdated Show resolved Hide resolved
@enen92 enen92 added the Type: Fix non-breaking change which fixes an issue label Aug 24, 2023
xbmc/windowing/osx/WinEventsOSXImpl.mm Outdated Show resolved Hide resolved
xbmc/windowing/osx/WinEventsOSXImpl.mm Outdated Show resolved Hide resolved
xbmc/windowing/osx/WinEventsOSXImpl.mm Outdated Show resolved Hide resolved
xbmc/windowing/osx/WinEventsOSXImpl.mm Outdated Show resolved Hide resolved
@kambala-decapitator
Copy link
Contributor

btw on the mouse topic: I've noticed that mouse cursor receives the big Kodi-style shape only after I move the cursor outside the fullscreen window and move it back. I observe the following:

  1. start Kodi with 2 screens, it opens on the second screen correctly
  2. move mouse inside Kodi - it has hardware cursor shape
  3. move the cursor outside the fullscreen window and move it back - it eceives the big Kodi-style shape
  4. e.g. move cursor to the top to reveal OS menubar - it turns to hardware shape again, moving it down inside Kodi doesn't change shape. 3) helps to restore cursor size again.

@enen92
Copy link
Member Author

enen92 commented Aug 24, 2023

btw on the mouse topic: I've noticed that mouse cursor receives the big Kodi-style shape only after I move the cursor outside the fullscreen window and move it back. I observe the following:

  1. start Kodi with 2 screens, it opens on the second screen correctly
  2. move mouse inside Kodi - it has hardware cursor shape
  3. move the cursor outside the fullscreen window and move it back - it eceives the big Kodi-style shape
  4. e.g. move cursor to the top to reveal OS menubar - it turns to hardware shape again, moving it down inside Kodi doesn't change shape. 3) helps to restore cursor size again.

I'll give a go but I never noticed this. Running macOS ventura right?

@kambala-decapitator
Copy link
Contributor

Running macOS ventura right?

yep

@enen92
Copy link
Member Author

enen92 commented Aug 24, 2023

Running macOS ventura right?

yep

Yeap can't reproduce unfortunately. Maybe this only happens on x86 or something (i'll keep it in mind to give it a spin with my old mac on the beginning of next month)

@enen92
Copy link
Member Author

enen92 commented Aug 24, 2023

Actually I could reproduce now - but for this to happen another app on another screen must be focused (e.g. click somewhere on xcode). I'll look into a fix when possible (outside of this PR though).

edit: fixed in #23659

@enen92 enen92 merged commit b049c37 into xbmc:master Aug 24, 2023
2 checks passed
@kambala-decapitator
Copy link
Contributor

didn't notice any issues with this PR in runtime test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Input Component: Windowing Platform: macOS Type: Fix non-breaking change which fixes an issue Type: Improvement non-breaking change which improves existing functionality v21 Omega
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants