Skip to content

gg: fix incorrect Event.mouse_x and Event.mouse_y on gg.Context.event_fn and gg.Context.on_event. - #23668

Merged
spytheman merged 1 commit into
vlang:masterfrom
islonely:master
Feb 8, 2025
Merged

spytheman merged 1 commit into
vlang:masterfrom
islonely:master

Conversation

@islonely

@islonely islonely commented Feb 8, 2025 •

Copy link
Copy Markdown
Contributor

Fixes #23667. I don't if this type of thing can have _test.v files written for it. But I have verified that this does work on Mac. The issue was caused by Event.mouse_x/y not being divided by the Context.scale before triggering the Context.event_fn. It needs to be tested on a high DPI display on Windows and Linux.

@huly-for-github

Copy link
Copy Markdown

Connected to Huly®: V_0.6-22089

@spytheman spytheman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work.

@spytheman
spytheman merged commit 6e3f6ac into vlang:master Feb 8, 2025
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.

gg.Event.mouse_x/y not correct value

2 participants