Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jason Tsai <jason@pews.dev>
  • Loading branch information
Legend-Master and pewsheen committed May 8, 2024
1 parent 3451755 commit d5c2352
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/tauri-runtime-wry/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4211,11 +4211,12 @@ fn get_work_area_size(target_monitor: &MonitorHandle) -> TaoPhysicalSize<u32> {
#[cfg(target_os = "macos")]
{
use cocoa::{appkit::NSScreen, base::id};
use tao::platform::windows::MonitorHandleExtMacOS;
use tao::platform::macos::MonitorHandleExtMacOS;
if let Some(ns_screen) = target_monitor.ns_screen() {
let ns_screen = ns_screen as id;
let rect = unsafe { ns_screen.visibleFrame() };
return TaoPhysicalSize::new(rect.size.width as u32, rect.size.height as u32);
return TaoLogicalSize::new(rect.size.width, rect.size.height)
.to_physical(target_monitor.scale_factor());
}
}
target_monitor.size()
Expand Down

0 comments on commit d5c2352

Please sign in to comment.