On 4 Apr 2016, at 10:59, Mojca Miklavec wrote:
I often have up to 100 files opened at the same time, spread across a number of desktops and I only reboot the OS about once in a month. But after every reboot or TM upgrade, I need to sort the windows manually again which is a bit annoying.
Currently TextMate has its own code to do session restore and as I do not know of API to tell what desktop a window is on, or what desktop it should open on, it is not possible to extend this code to support multiple desktops.
Apple has introduced window restoration API which TextMate could be changed to use, however, my tests show that only during a reboot (without quitting apps first) does it restore windows onto the same desktop.
So even if TextMate was migrated over to the system API, a normal quit and relaunch would not restore windows onto the desired desktops, and this would include upgrading TextMate.
I’m investigating if it would be possible to either terminate or launch TextMate in such a way so that the system restoration system would not confine all windows to a single desktop, if I find a way, there would be more motivation to migrate TextMate to use the system API (ideally it would use the system API but it’s easier said than done).