Skip to content

Use new GTK session save/restore API#840

Draft
DaPigGuy wants to merge 5 commits intotchx84:masterfrom
DaPigGuy:session-save-restore
Draft

Use new GTK session save/restore API#840
DaPigGuy wants to merge 5 commits intotchx84:masterfrom
DaPigGuy:session-save-restore

Conversation

@DaPigGuy
Copy link
Copy Markdown

@DaPigGuy DaPigGuy commented Jan 9, 2026

GTK is now able to handle saving/restoring sessions. It automatically handles restoring window size/fullscreen/maximized state. On Wayland, it integrates with the (currently experimental) session management protocol to restore the window position, which is probably the biggest motivator for this, although this is currently not ready when running under Flatpak? GTK does auto saves every 15s and on app closing.

See for more info: GNOME initiative

API is not yet stable, so let's wait til GNOME 50

@DaPigGuy DaPigGuy force-pushed the session-save-restore branch 3 times, most recently from 5d2f97d to 15cd49d Compare January 9, 2026 13:45
@tchx84
Copy link
Copy Markdown
Owner

tchx84 commented Jan 10, 2026

@DaPigGuy thanks for working on this, I will take a look this week and let's merge it when it's stable

@DaPigGuy DaPigGuy force-pushed the session-save-restore branch from 15cd49d to 587e5cb Compare January 12, 2026 03:24
Comment thread src/application.js Outdated
this._window.showApplication(selectedAppId);
}

/* Only restore the search entry for crash recover or session restore */
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Let's leave this search-entry restore behavior out for now, and focus on the existing behaviors. Making this PR simple as possible.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Sure

@DaPigGuy DaPigGuy force-pushed the session-save-restore branch from 587e5cb to 290381f Compare January 20, 2026 04:19
@DaPigGuy
Copy link
Copy Markdown
Author

Looks like this won't be happening for GNOME 50 😅

https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/9395

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