Skip to content

[Fix]: Opened-maximized windows return to origin workspace on unmaximize - #123

Open
aidanlw505 wants to merge 2 commits into
CleoMenezesJr:mainfrom
aidanlw505:fix/opened-maximized-workspace-return
Open

aidanlw505 wants to merge 2 commits into
CleoMenezesJr:mainfrom
aidanlw505:fix/opened-maximized-workspace-return

Conversation

@aidanlw505

@aidanlw505 aidanlw505 commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Description

Currently if a workspace had windows and a new window that is maximized is opened forcing it to a new workspace, it wouldn't be given undo info. With this info added, you can unmaximize it to join it with the origin workspace if possible. I originally thought and have seen others suggest that the extension should unmaximize windows, but this feels like a fix that allieviates the need for that while respecting window geometry.

Fixes / Improvements

  • Fix: Opened-maximized windows return to origin workspace on unmaximize

Validation

  1. Opened window on workspace
  2. Opened a new maximized window, which get's moved to a new workspace
  3. Unmaximize and window get's moved to the origin workspace if possible

Known related issues

#124
If the origin workspace has a maximized window, there is awkward animations as it tries to send the window to the origin and then sends back out to a new workspace since the origin has a maximized window. This is already an existing issue that can be replicated by manually maximizing windows. I will look for any existing issues or open a new one and update this.

@CleoMenezesJr

Copy link
Copy Markdown
Owner

I think this can leave the window stuck with openedMaximized and unmaximizing set. Those flags only get cleared by the two settle timers now, and handleUnmaximizeUndo has a few exits that never reach them: !canFit, origin workspace gone, and the edge-tiling zone return. The notify backup won't save it either, since it hits this early return once the undo info is used up.

Easy repro: open a maximized window in a busy workspace, fill the origin up a bit more, then unmaximize. After that, resizing it doesn't retile and maximizing again doesn't isolate it.

Maybe just drop openedMaximized here once you know there's undo info? Then the !unmaximizing checks in windowHandler might not be needed at all.

Comment thread extension/windowHandler.js Resolved
Comment thread extension/resizeHandler.js Resolved
@aidanlw505
aidanlw505 force-pushed the fix/opened-maximized-workspace-return branch from 4bc9836 to d3bbee1 Compare October 2, 2026 22:05
@CleoMenezesJr

Copy link
Copy Markdown
Owner

Thanks, the openingSize change looks good. The stuck-flags thing from my other comment is still there though: !canFit and the other early exits in handleUnmaximizeUndo never clear openedMaximized / unmaximizing. Could you take a look at that one too?

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.

2 participants