File tree Expand file tree Collapse file tree
src/platform_impl/windows Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -324,7 +324,10 @@ impl WindowFlags {
324324 return ;
325325 }
326326
327- if new. contains ( WindowFlags :: VISIBLE ) {
327+ if new. contains ( WindowFlags :: VISIBLE )
328+ && !new. contains ( WindowFlags :: MAXIMIZED )
329+ && !new. contains ( WindowFlags :: MINIMIZED )
330+ {
328331 let flag = if !self . contains ( WindowFlags :: MARKER_ACTIVATE ) {
329332 self . set ( WindowFlags :: MARKER_ACTIVATE , true ) ;
330333 SW_SHOWNOACTIVATE
@@ -359,7 +362,9 @@ impl WindowFlags {
359362 }
360363 }
361364
362- if diff. contains ( WindowFlags :: MAXIMIZED ) || new. contains ( WindowFlags :: MAXIMIZED ) {
365+ if new. contains ( WindowFlags :: VISIBLE )
366+ && ( diff. contains ( WindowFlags :: MAXIMIZED ) || new. contains ( WindowFlags :: MAXIMIZED ) )
367+ {
363368 unsafe {
364369 ShowWindow ( window, match new. contains ( WindowFlags :: MAXIMIZED ) {
365370 true => SW_MAXIMIZE ,
@@ -369,7 +374,9 @@ impl WindowFlags {
369374 }
370375
371376 // Minimize operations should execute after maximize for proper window animations
372- if diff. contains ( WindowFlags :: MINIMIZED ) {
377+ if new. contains ( WindowFlags :: VISIBLE )
378+ && ( diff. contains ( WindowFlags :: MINIMIZED ) || new. contains ( WindowFlags :: MINIMIZED ) )
379+ {
373380 unsafe {
374381 ShowWindow ( window, match new. contains ( WindowFlags :: MINIMIZED ) {
375382 true => SW_MINIMIZE ,
You can’t perform that action at this time.
0 commit comments