Skip to content

#141 fix: preserve maximized state when restoring inactive EVE clients - #140

Open
XiaomaiTX wants to merge 1 commit into
Proopai:feature/rollup-features-from-other-forksfrom
XiaomaiTX:bugfix/preserve-eve-maximized-state
Open

#141 fix: preserve maximized state when restoring inactive EVE clients#140
XiaomaiTX wants to merge 1 commit into
Proopai:feature/rollup-features-from-other-forksfrom
XiaomaiTX:bugfix/preserve-eve-maximized-state

Conversation

@XiaomaiTX

Copy link
Copy Markdown

Summary

Fixes the loss of maximized state when restoring EVE clients that were automatically minimized as inactive.

Root cause

Preview activation may trigger two consecutive activation calls. Because ShowWindowAsync is asynchronous, the second call can still observe the window as minimized. The previous implementation removed the cached pre-minimize state during the first call, causing the second call to use SW_RESTORE instead of restoring the client as maximized.

Changes

  • Keep the cached pre-minimize maximized state available while the window remains minimized.
  • Restore previously maximized clients with SW_SHOWMAXIMIZED.
  • Continue using SW_RESTORE for clients that were not maximized.
  • Clear cached state when a window is no longer minimized or when the client exits.
  • Skip minimized clients when updating tracked client layouts to prevent incorrect layout persistence.

Verification

  • Debug build completed through C# compilation.
  • Manual regression scenarios to verify:
    • No Animation + minimized inactive clients.
    • Original Animation + minimized inactive clients.
    • “Track client locations” enabled.
    • “Track client locations” disabled.
    • Previously maximized and previously normal EVE clients.

Risk

The change only affects restoration of windows that EVE-O Preview has minimized. Normal window activation and manually managed window states retain their existing behavior.

- Preserve the window state across asynchronous double activation.
- Restore previously maximized clients with SW_SHOWMAXIMIZED.
- Avoid saving layouts for minimized clients.
- Clear cached window state when clients exit.
@XiaomaiTX XiaomaiTX changed the title fix: preserve maximized state when restoring inactive EVE clients #141 fix: preserve maximized state when restoring inactive EVE clients Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant