mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-11 13:31:29 +11:00
Fix set_minimized(true) works only with decorations on macOS (#1411)
* On macOS, Fix set_minimized(true) works only with decorations * Add CHANGELOG
This commit is contained in:
parent
e295104199
commit
22dcc19898
|
@ -1,5 +1,6 @@
|
||||||
# Unreleased
|
# Unreleased
|
||||||
|
|
||||||
|
- On macOS, fix set_minimized(true) works only with decorations.
|
||||||
- On macOS, add `hide_application` to `EventLoopWindowTarget` via a new `EventLoopWindowTargetExtMacOS` trait. `hide_application` will hide the entire application by calling `-[NSApplication hide: nil]`.
|
- On macOS, add `hide_application` to `EventLoopWindowTarget` via a new `EventLoopWindowTargetExtMacOS` trait. `hide_application` will hide the entire application by calling `-[NSApplication hide: nil]`.
|
||||||
- On macOS, fix not sending ReceivedCharacter event for specific keys combinations.
|
- On macOS, fix not sending ReceivedCharacter event for specific keys combinations.
|
||||||
- On macOS, fix `CursorMoved` event reporting the cursor position using logical coordinates.
|
- On macOS, fix `CursorMoved` event reporting the cursor position using logical coordinates.
|
||||||
|
|
|
@ -150,10 +150,14 @@ fn create_window(
|
||||||
let mut masks = if !attrs.decorations && !screen.is_some() {
|
let mut masks = if !attrs.decorations && !screen.is_some() {
|
||||||
// Resizable UnownedWindow without a titlebar or borders
|
// Resizable UnownedWindow without a titlebar or borders
|
||||||
// if decorations is set to false, ignore pl_attrs
|
// if decorations is set to false, ignore pl_attrs
|
||||||
NSWindowStyleMask::NSBorderlessWindowMask | NSWindowStyleMask::NSResizableWindowMask
|
NSWindowStyleMask::NSBorderlessWindowMask
|
||||||
|
| NSWindowStyleMask::NSResizableWindowMask
|
||||||
|
| NSWindowStyleMask::NSMiniaturizableWindowMask
|
||||||
} else if pl_attrs.titlebar_hidden {
|
} else if pl_attrs.titlebar_hidden {
|
||||||
// if the titlebar is hidden, ignore other pl_attrs
|
// if the titlebar is hidden, ignore other pl_attrs
|
||||||
NSWindowStyleMask::NSBorderlessWindowMask | NSWindowStyleMask::NSResizableWindowMask
|
NSWindowStyleMask::NSBorderlessWindowMask
|
||||||
|
| NSWindowStyleMask::NSResizableWindowMask
|
||||||
|
| NSWindowStyleMask::NSMiniaturizableWindowMask
|
||||||
} else {
|
} else {
|
||||||
// default case, resizable window with titlebar and titlebar buttons
|
// default case, resizable window with titlebar and titlebar buttons
|
||||||
NSWindowStyleMask::NSClosableWindowMask
|
NSWindowStyleMask::NSClosableWindowMask
|
||||||
|
|
Loading…
Reference in a new issue