Skip to content

Commit

Permalink
fix(window): is_decorated wrong return value, closes #518 (#519)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Aug 4, 2022
1 parent 4ea78bc commit c3e076e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changes/fix-macos-is-decorated.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tao": patch
---

Fixes `Window::is_decorated` always returning `true` on macOS.
8 changes: 1 addition & 7 deletions src/platform_impl/macos/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -861,13 +861,7 @@ impl UnownedWindow {

#[inline]
pub fn is_decorated(&self) -> bool {
let current_mask = unsafe { self.ns_window.styleMask() };
if current_mask
== NSWindowStyleMask::NSMiniaturizableWindowMask | NSWindowStyleMask::NSResizableWindowMask
{
return false;
}
true
self.decorations.load(Ordering::Acquire)
}

#[inline]
Expand Down

0 comments on commit c3e076e

Please sign in to comment.