Skip to content

Commit

Permalink
Fix MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Borber committed Dec 26, 2023
1 parent c620406 commit c387a48
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src-tauri/src/shortcut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ pub fn show(panel: &Window) -> Result<()> {
Mouse::Position { mut x, mut y } => {
#[cfg(target_os = "macos")]
{
let monitor = panel
.current_monitor()
.expect("Failed to get panel current monitor")
.expect("Panel is none");
let scale_factor = monitor.scale_factor();
x = (x as f64 * scale_factor) as i32;
y = (y as f64 * scale_factor) as i32;
Expand Down

0 comments on commit c387a48

Please sign in to comment.