You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Fix]: Opened-maximized windows return to origin workspace on unmaximize - #123
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
Opened window on workspace
Opened a new maximized window, which get's moved to a new workspace
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.
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.
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?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Validation
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.