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

[bug][macOS] weird(laggy) window dragging behavior near monitor boundaries #922

Closed
BillGoldenWater opened this issue May 2, 2024 · 0 comments

Comments

@BillGoldenWater
Copy link
Contributor

Describe the bug
when dragging a window near monitor boundaries, the window would not go where it should be

Steps To Reproduce

  1. run examples/window
  2. drag to another monitor(maybe require has different scale factor)
  3. drag back but not too much cross the boundary
  4. do some small move

Expected behavior
no deviation when dragging

Screenshots
https://github.com/tauri-apps/tao/assets/53564043/f7f67dd6-9fec-4522-80a4-5d99640319f3

Platform and Versions (please complete the following information):
OS: macOS 14.4.1 (aarch64)
Rustc: rustc 1.78.0 (9b00956e5 2024-04-29)

Additional context

let physical_size = *new_inner_size;
let logical_size = physical_size.to_logical(scale_factor);
let size = NSSize::new(logical_size.width, logical_size.height);
unsafe { NSWindow::setContentSize_(*ns_window, size) };

also winit:
https://github.com/rust-windowing/winit/blob/337d50779c299240f6e0a67ef3e852f1c971cf16/src/platform_impl/macos/app_delegate.rs#L374-L378

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants