Skip to content

Fix modifier changed event on macOS#11

Merged
murarth merged 1 commit intomurarth:modifiers-changed-window-eventfrom
chrisduerr:modifiers-changed-window-event
Mar 2, 2020
Merged

Fix modifier changed event on macOS#11
murarth merged 1 commit intomurarth:modifiers-changed-window-eventfrom
chrisduerr:modifiers-changed-window-event

Conversation

@chrisduerr
Copy link
Copy Markdown

Since the mouse_entered function was generating a mouse motion, which
updates the modifier state, a modifiers changed event was incorrectly
generated.

The updating of the modifier state has also been changed to make sure it
consistently happens before events that have a modifier state attached
to it, without happening on any other event.

This of course means that no CursorMoved event is generated anymore
when the user enters the window without it being focused, however I'd
say that is consistent with how winit should behave.

Since the `mouse_entered` function was generating a mouse motion, which
updates the modifier state, a modifiers changed event was incorrectly
generated.

The updating of the modifier state has also been changed to make sure it
consistently happens before events that have a modifier state attached
to it, without happening on any other event.

This of course means that no `CursorMoved` event is generated anymore
when the user enters the window without it being focused, however I'd
say that is consistent with how winit should behave.
@murarth murarth merged commit cf5792f into murarth:modifiers-changed-window-event Mar 2, 2020
@chrisduerr chrisduerr deleted the modifiers-changed-window-event branch March 2, 2020 04:48
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 this pull request may close these issues.

2 participants