FIX Crash on macOS when starting maximized without decorations (#1323)
* FIX #1288 * Fix CHANGELOG.md Co-authored-by: Freya Gentz <zegentzy@protonmail.com>
This commit is contained in:
parent
73248bdced
commit
38c8cb9f4a
2 changed files with 10 additions and 5 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
# Unreleased
|
# Unreleased
|
||||||
|
|
||||||
|
- On macOS, fix crash when starting maximized without decorations.
|
||||||
- On macOS, fix application not to terminate on `run_return`.
|
- On macOS, fix application not to terminate on `run_return`.
|
||||||
- On Wayland, fix cursor icon updates on window borders when using CSD.
|
- On Wayland, fix cursor icon updates on window borders when using CSD.
|
||||||
- On Wayland, under mutter(GNOME Wayland), fix CSD being behind the status bar, when starting window in maximized mode.
|
- On Wayland, under mutter(GNOME Wayland), fix CSD being behind the status bar, when starting window in maximized mode.
|
||||||
|
|
|
||||||
|
|
@ -60,11 +60,15 @@ pub unsafe fn set_style_mask_async(ns_window: id, ns_view: id, mask: NSWindowSty
|
||||||
}
|
}
|
||||||
pub unsafe fn set_style_mask_sync(ns_window: id, ns_view: id, mask: NSWindowStyleMask) {
|
pub unsafe fn set_style_mask_sync(ns_window: id, ns_view: id, mask: NSWindowStyleMask) {
|
||||||
let context = SetStyleMaskData::new_ptr(ns_window, ns_view, mask);
|
let context = SetStyleMaskData::new_ptr(ns_window, ns_view, mask);
|
||||||
dispatch_sync_f(
|
if msg_send![class!(NSThread), isMainThread] {
|
||||||
dispatch_get_main_queue(),
|
set_style_mask_callback(context as *mut _);
|
||||||
context as *mut _,
|
} else {
|
||||||
set_style_mask_callback,
|
dispatch_sync_f(
|
||||||
);
|
dispatch_get_main_queue(),
|
||||||
|
context as *mut _,
|
||||||
|
set_style_mask_callback,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct SetContentSizeData {
|
struct SetContentSizeData {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue