Open jkelleyrtp opened 8 months ago
I have a fix for this - but I think there's just something wrong with tao internally.
Old:
let view_frame = unsafe { NSView::frame(*self.ns_view) };
Suggested:
let view_frame = unsafe { NSView::frame((*self.ns_window).contentView()) };
I can confirm that this fixes the bug.
However, this leads me to believe the pointer used by the ns_view is just stale, and is endemic to the rest of the tao codebase.
Hi, are you calling inner_size()
from Tauri window API or from tao?
It looks fine with tao only (from multithreaded example in tao). For Tauri, there is an issue that has already been fixed recently https://github.com/tauri-apps/tauri/issues/9236
Describe the bug
Calling window.inner_size() always return the same wrong answer on mac (presumably whatever the window started as).
This makes implementing window size restore difficult since we can only set the inner_size of the window, but the outer_size works properly.
Here's me attempting to use it in dioxus. We're able to catch the size from the resize event, which solves the problem I was trying to solve, but is a hacky solution in lieu of this actually working.
Steps To Reproduce