You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When my mouse is focused on another monitor , we use primary_monitor , my primary_monitor can't show web-view window, but when i focused on primary_monitor , we use primary_monitor, will show web-view window.
this is my code, pls check.
by the way , when my mouse is another monitor or primary_monitor , the information printed is all my primary_monitor.
if let Some(primary_monitor) = app_handle.primary_monitor().unwrap() {
let screen_size = primary_monitor.size();
println!("screen_size: {:?}", screen_size);
println!("primary_monitor: {:?}", primary_monitor);
// screen_size: PhysicalSize { width: 3360, height: 2100 }
// primary_monitor: Monitor { name: Some("Monitor #41032"), size: PhysicalSize { width: 3360, height: 2100 }, position: PhysicalPosition { x: 0, y: 0 }, scale_factor: 2.0 }
let window_size = voice_bubble.inner_size().unwrap();
let margin = 140.0;
let x = screen_size.width as f64 - window_size.width as f64 - margin;
let y = screen_size.height as f64 - window_size.height as f64 - margin;
let primary_position = primary_monitor.position();
voice_bubble
.set_position(tauri::Position::Physical(tauri::PhysicalPosition {
x: (primary_position.x as f64 + x) as i32,
y: (primary_position.y as f64 + y) as i32,
}))
.unwrap();
}
voice_bubble.show().unwrap();
Describe the bug
When my mouse is focused on another monitor , we use primary_monitor , my primary_monitor can't show web-view window, but when i focused on primary_monitor , we use primary_monitor, will show web-view window.
this is my code, pls check.
by the way , when my mouse is another monitor or primary_monitor , the information printed is all my primary_monitor.
Reproduction
No response
Expected behavior
No response
Full
tauri info
outputStack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: