Skip to content

chore: Add backup functionality to window layout - #7272

Merged
pajlada merged 4 commits into
Chatterino:masterfrom
Nerixyz:chore/restore-window-layout
Sep 13, 2026
Merged

pajlada merged 4 commits into
Chatterino:masterfrom
Nerixyz:chore/restore-window-layout

Conversation

@Nerixyz

@Nerixyz Nerixyz commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Someone on Discord mentioned that their window layout reset occasionally. We already have some backup restoration functionality for settings, so this PR uses that for the window layout. Most of this PR is switching to ExpectedStr and passing the errors on.

When parsing command line arguments, we also check the window layout for the initial bounds. But here I opted to not do restoration, as it's only a hint to where the window should be placed.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Comment thread src/common/WindowDescriptors.cpp Outdated

@pajlada pajlada left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just this small nit, otherwise looks good.
Testing it in the meantime.

EDIT: Testing went well

Comment thread src/common/Args.cpp
return window.geometry_;
return window.geometry_;
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we have an error message here, maybe we can print that still

@pajlada
pajlada enabled auto-merge (squash) September 13, 2026 11:50
@pajlada
pajlada merged commit 05613c5 into Chatterino:master Sep 13, 2026
18 checks passed
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