sublimehq / sublime_text

Issue tracker for Sublime Text
https://www.sublimetext.com
814 stars 40 forks source link

Windows are not restored to the correct desktop (space) on MacOS Sonoma 14.5 (23F79) #6419

Open neonihil opened 4 months ago

neonihil commented 4 months ago

Description of the bug

When closing/reopening SublimeText all windows are reopened on the current desktop (space) instead of the space they were in originally. Basically all windows are collected to the space where Sublime is opened.

This behaviour is different from what I experience on Ventura and previous versions, where Sublime Text windows are reopened onto the exact same spaces they were in at the time of closing the application.

The application is closed gracefully (CMD+Q).

Steps to reproduce

1) Start ST 2) Open two projects (or use any method to have more than one ST Window) 3) Move one of the Sublime windows to a different desktop 4) Quit ST(CMD+Q) 5) Re-open SublimeText 6) Both windows are opened on the same desktop

Expected behavior

Windows should be opened on the desktop they last were on

Actual behavior

All windows are opened on the current desktop

Sublime Text build number

4169

Operating system & version

14.5 (23F79)

(Linux) Desktop environment and/or window manager

No response

Additional information

Using a MBP M2 late 2023

OpenGL context information

No response

BenjaminSchaaf commented 4 months ago

Do you have the "remember_workspace" setting enabled?

neonihil commented 4 months ago

Yes, I do. I have this in my Preferences.sublime-settings.

"remember_workspace": true,

I also tried to add this to the user preferences too, but behaviour is the same. Windows are always restored to the same desktop. Sublime Merge also behaves in the same way.

Window restoration has been working well for a long time. I only noticed it breaking about a month earlier than I created this issue.

I suspect that a recent updates (maybe on the macos side) might be the culprit.

Can I enable some special logging to provide you information about the startup?

BenjaminSchaaf commented 4 months ago

I'm able to reproduce this but only on 14.5. This is certainly a regression introduced by Apple.

neonihil commented 3 months ago

I have tested it with a "virgin" Sublime (ie: by removing the ~/Library/Application Support/Sublime Text folder) on 14.5, and it's still reproducible. This is ruling out any interference from plugins / settings.