Skip to content

Commit

Permalink
fix(macos): race condition when toggling traffic light, close tauri#9…
Browse files Browse the repository at this point in the history
…210 (#901)
  • Loading branch information
pewsheen authored Apr 3, 2024
1 parent 73883cb commit 9ef1379
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changes/fix-mac-style-mask-race-condition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tao": patch
---

On macOS, fix an issue where the set minimize maximize and close buttons would interfere with each other.
6 changes: 3 additions & 3 deletions src/platform_impl/macos/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ impl UnownedWindow {
} else {
mask &= !NSWindowStyleMask::NSResizableWindowMask;
}
self.set_style_mask_async(mask);
self.set_style_mask_sync(mask);
} // Otherwise, we don't change the mask until we exit fullscreen.
}

Expand All @@ -756,7 +756,7 @@ impl UnownedWindow {
} else {
mask &= !NSWindowStyleMask::NSMiniaturizableWindowMask;
}
self.set_style_mask_async(mask);
self.set_style_mask_sync(mask);
}

#[inline]
Expand All @@ -777,7 +777,7 @@ impl UnownedWindow {
} else {
mask &= !NSWindowStyleMask::NSClosableWindowMask;
}
self.set_style_mask_async(mask);
self.set_style_mask_sync(mask);
}

pub fn set_cursor_icon(&self, cursor: CursorIcon) {
Expand Down

0 comments on commit 9ef1379

Please sign in to comment.