mirror of
https://github.com/wez/wezterm.git
synced 2024-12-25 14:22:37 +03:00
macos: correctly synthesize WindowState::MAXIMIZED
This commit is contained in:
parent
a278dbf43f
commit
8b03890b8b
@ -2710,6 +2710,12 @@ impl WindowView {
|
|||||||
|
|
||||||
let live_resizing = inner.live_resizing;
|
let live_resizing = inner.live_resizing;
|
||||||
|
|
||||||
|
let is_zoomed = !is_full_screen
|
||||||
|
&& inner.window.as_ref().map_or(false, |window| {
|
||||||
|
let window = window.load();
|
||||||
|
unsafe { msg_send![*window, isZoomed] }
|
||||||
|
});
|
||||||
|
|
||||||
inner.events.dispatch(WindowEvent::Resized {
|
inner.events.dispatch(WindowEvent::Resized {
|
||||||
dimensions: Dimensions {
|
dimensions: Dimensions {
|
||||||
pixel_width: width as usize,
|
pixel_width: width as usize,
|
||||||
@ -2719,6 +2725,8 @@ impl WindowView {
|
|||||||
},
|
},
|
||||||
window_state: if is_full_screen {
|
window_state: if is_full_screen {
|
||||||
WindowState::FULL_SCREEN
|
WindowState::FULL_SCREEN
|
||||||
|
} else if is_zoomed {
|
||||||
|
WindowState::MAXIMIZED
|
||||||
} else {
|
} else {
|
||||||
WindowState::default()
|
WindowState::default()
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user