-
-
Notifications
You must be signed in to change notification settings - Fork 216
fix(macos): treat Monitor::from_point args as physical #1057
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
base: dev
Are you sure you want to change the base?
fix(macos): treat Monitor::from_point args as physical #1057
Conversation
f49db41
to
04fec90
Compare
Package Changes Through 45236e4There are 1 changes which include tao with patch Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since macOS uses logical coordinates, there might be a chance that developers can only pass logical position to from_point
(like the coordinate was retrieved from an OS event). If we only accept physical position then the function may become useless in the case.
I'm thinking that if we change the interface from x:f64, y:f64
to Position
, then we can take care of both scenarios. But this will be a breaking change and Tauri may require another PR for adapting this.
cc @FabianLars
This seems to be a tricky situation. Adjusting the behavior might be a breaking change for some users but at the same time I think that Using Position for the parameter sounds like a good solution which would also be more consistent with the rest of the API. Maybe we could introduce a new |
The x and y values passed to from_point are now treated as physical and therefore converted to logical values on macOS. This makes the behavior consistent with the Windows implementation. Closes tauri-apps/tauri#12676.
04fec90
to
45236e4
Compare
with tao being 0.x this imo doesn't really matter unless we simply prefer one name over the other. |
let's just document that monitor_from_point takes logical values on macOS and physical on other platforms, and add monitor_from_position |
we can just remove it altogether and release a minor for |
It looks like this is not the only function that works with logical values instead of physical ones on Mac. Look at #1023. In this case, I think updating the docs and deprecating the existing methods that are inconsistent between platforms in favor of creating new ones in the next versions would be a more preferable approach for many users. |
The
x
andy
values passed tofrom_point
are now treated as physical and therefore converted to logical values on macOS. This makes the behavior consistent with the Windows implementation.Closes tauri-apps/tauri#12676.