File tree Expand file tree Collapse file tree 2 files changed +21
-6
lines changed Expand file tree Collapse file tree 2 files changed +21
-6
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ window-state : patch
3+ ---
4+
5+ On macOS the plugin now (temporarily) ignores the maximized state for undecorated windows on resize events to fix app freezes.
Original file line number Diff line number Diff line change @@ -471,13 +471,23 @@ impl Builder {
471471 . 0
472472 . try_lock ( )
473473 . is_ok ( )
474- && !window_clone. is_minimized ( ) . unwrap_or_default ( )
475- && !window_clone. is_maximized ( ) . unwrap_or_default ( )
476474 {
477- let mut c = cache. lock ( ) . unwrap ( ) ;
478- if let Some ( state) = c. get_mut ( & label) {
479- state. width = size. width ;
480- state. height = size. height ;
475+ // TODO: Remove once https://github.com/tauri-apps/tauri/issues/5812 is resolved.
476+ let is_maximized = if cfg ! ( target_os = "macos" )
477+ && ( !window_clone. is_decorated ( ) . unwrap_or_default ( )
478+ || !window_clone. is_resizable ( ) . unwrap_or_default ( ) )
479+ {
480+ false
481+ } else {
482+ window_clone. is_maximized ( ) . unwrap_or_default ( )
483+ } ;
484+
485+ if !window_clone. is_minimized ( ) . unwrap_or_default ( ) && !is_maximized {
486+ let mut c = cache. lock ( ) . unwrap ( ) ;
487+ if let Some ( state) = c. get_mut ( & label) {
488+ state. width = size. width ;
489+ state. height = size. height ;
490+ }
481491 }
482492 }
483493 }
You can’t perform that action at this time.
0 commit comments