Skip to content

Save the Gui state in another file - #9145

Merged
sithlord48 merged 5 commits into
masterfrom
guiState
Nov 14, 2025
Merged

Save the Gui state in another file#9145
sithlord48 merged 5 commits into
masterfrom
guiState

Conversation

@sithlord48

@sithlord48 sithlord48 commented Nov 11, 2025

Copy link
Copy Markdown
Member

Fixes: #9132

Saves the geometry to a state file on every os under $XDG_STATE_HOME/Deskflow.state OR QStandardPaths::GenericStatePath/Deskflow.state unless in portable mode then it just uses the normal settings file.

Also fixes a bug where we were not restoring the window size when it was hidden to the tray .

@sithlord48
sithlord48 requested a review from nbolton as a code owner November 11, 2025 20:12
@sithlord48 sithlord48 added the 🪄 feature request This PR adds a requested feature label Nov 11, 2025
@sithlord48
sithlord48 force-pushed the guiState branch 2 times, most recently from cc1f080 to aa755c3 Compare November 11, 2025 20:42
@sithlord48 sithlord48 changed the title Save the Gui state in another files Save the Gui state in another file Nov 12, 2025

@nbolton nbolton 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.

The window size doesn't appear to be restored for me.

@sithlord48

Copy link
Copy Markdown
Member Author

Odd what did you test on ? I tried on kde w/o issue.

@nbolton

nbolton commented Nov 13, 2025

Copy link
Copy Markdown
Member

Odd what did you test on ?

Both GNOME and KDE.

  1. Resize window
  2. Restart GUI

Expected: Window size restored
Actual: Window is tiny

@sithlord48

Copy link
Copy Markdown
Member Author

Do you have a ~/.local/state directory can you see in it a deskflow.state file ?

@sithlord48

Copy link
Copy Markdown
Member Author

The tests were resetting the state file to fix this all tests using setting must also set the state file to be used.

@sithlord48
sithlord48 marked this pull request as ready for review November 13, 2025 21:30
nbolton
nbolton previously approved these changes Nov 14, 2025

@nbolton nbolton 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.

Window restore works now, but there's a small improvement you could make if you feel like it.

Comment thread src/lib/common/Settings.cpp Outdated
Comment thread src/lib/common/Settings.cpp
@sithlord48
sithlord48 merged commit 1a9e468 into master Nov 14, 2025
34 checks passed
@sithlord48
sithlord48 deleted the guiState branch November 14, 2025 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🪄 feature request This PR adds a requested feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do not save state in config file.

2 participants