Always remember the last window size and position (#9416)

make new runs of zed always match the window of the previous run of Zed,
even if it's not the same workspace

fixes https://github.com/zed-industries/zed/issues/5258

Release Notes:

- Zed will always open new windows with the same position and location
as the previous instance of Zed.
This commit is contained in:
Mikayla Maki 2024-03-15 14:24:44 -07:00 committed by GitHub
parent eecbafb94e
commit 41071b093c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 35 additions and 28 deletions

View file

@ -421,8 +421,8 @@ impl WorkspaceDb {
}
query! {
pub fn last_monitor() -> Result<Option<Uuid>> {
SELECT display
pub fn last_window() -> Result<(Option<Uuid>, Option<SerializedWindowsBounds>, Option<bool>)> {
SELECT display, window_state, window_x, window_y, window_width, window_height, fullscreen
FROM workspaces
WHERE workspace_location IS NOT NULL
ORDER BY timestamp DESC