File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -344,7 +344,10 @@ impl WindowFlags {
344344 return ;
345345 }
346346
347- if new. contains ( WindowFlags :: VISIBLE ) {
347+ if new. contains ( WindowFlags :: VISIBLE )
348+ && !new. contains ( WindowFlags :: MAXIMIZED )
349+ && !new. contains ( WindowFlags :: MINIMIZED )
350+ {
348351 let flag = if !self . contains ( WindowFlags :: MARKER_ACTIVATE ) {
349352 self . set ( WindowFlags :: MARKER_ACTIVATE , true ) ;
350353 SW_SHOWNOACTIVATE
@@ -379,7 +382,9 @@ impl WindowFlags {
379382 }
380383 }
381384
382- if diff. contains ( WindowFlags :: MAXIMIZED ) || new. contains ( WindowFlags :: MAXIMIZED ) {
385+ if new. contains ( WindowFlags :: VISIBLE )
386+ && ( diff. contains ( WindowFlags :: MAXIMIZED ) || new. contains ( WindowFlags :: MAXIMIZED ) )
387+ {
383388 unsafe {
384389 ShowWindow ( window, match new. contains ( WindowFlags :: MAXIMIZED ) {
385390 true => SW_MAXIMIZE ,
@@ -389,7 +394,9 @@ impl WindowFlags {
389394 }
390395
391396 // Minimize operations should execute after maximize for proper window animations
392- if diff. contains ( WindowFlags :: MINIMIZED ) {
397+ if new. contains ( WindowFlags :: VISIBLE )
398+ && ( diff. contains ( WindowFlags :: MINIMIZED ) || new. contains ( WindowFlags :: MINIMIZED ) )
399+ {
393400 unsafe {
394401 ShowWindow ( window, match new. contains ( WindowFlags :: MINIMIZED ) {
395402 true => SW_MINIMIZE ,
Original file line number Diff line number Diff line change @@ -61,3 +61,4 @@ changelog entry.
6161- On Wayland, switch from using the ` ahash ` hashing algorithm to ` foldhash ` .
6262- On macOS, fix borderless game presentation options not sticking after switching spaces.
6363- On macOS, fix IME being locked on (regardless of requests to disable) after being enabled once.
64+ - On Windows, avoid briefly showing hidden windows when applying maximized or minimized state.
You can’t perform that action at this time.
0 commit comments