Closed laggingreflex closed 3 years ago
I don't have a Windows 10 system for testing at the moment, but I believe that the flickering behavior could be some ST internal behavior glitch on Windows 10 hence it not appears on Linux virtual desktops.
About the activating the right ST window on multiple desktops, this might not be possible the ST API does not provide virtual desktop handling and the browser APIs does not support it too. There is not deterministic way identifying the right ST window, currently I don't know if finding the last active window is possible through the ST API.
Please give me some time about this.
But you could try the new_window_on_connect
flag.
Using new_window_on_connect
flag, it creates a new window on the same desktop but then it doesn't actually use that window, and instead it does the same thing (flickering through windows).
Doing it again, with the now newly opened window (by ghost-text), it still opens up yet another window and neither uses that one, nor the previously created one, but instead does the same thing again, i.e tries to switch over to other windows/desktops several times before settling on a seemingly random window, can't even say if it's the last used window this time, as it should've been one of the two newly created ones.
Using ST3 build 3083
Be happy to help in any other debugging/patch-testing process. Love the project btw!
If you paste the following code into your ST Console, does it flickers, too?
[(window, view) for window in sublime.windows() for view in window.views()]
Just paste and enter? No, it doesn't flicker, just outputs this result:
>>> [(window, view) for window in sublime.windows() for view in window.views()]
[(<sublime.Window object at 0x0448DAB0>, <sublime.View object at 0x04485190>), (<sublime.Window object at 0x0448DB30>, <sublime.View object at 0x04485250>), (<sublime.Window object at 0x0448DB30>, <sublime.View object at 0x04485270>), (<sublime.Window object at 0x0448D650>, <sublime.View object at 0x04485330>), (<sublime.Window object at 0x0448D650>, <sublime.View object at 0x04485150>), (<sublime.Window object at 0x0448D650>, <sublime.View object at 0x04485050>), (<sublime.Window object at 0x04485170>, <sublime.View object at 0x044851B0>), (<sublime.Window object at 0x04485170>, <sublime.View object at 0x04485070>), (<sublime.Window object at 0x04485170>, <sublime.View object at 0x04485310>)]
I'm using Windows 10's virtual desktops and have multiple sublime text windows open on multiple virtual desktops.
When I activate the browser extension (which is on one of the virtual desktops), it flickers through all desktops trying to find a sublime text window. I think it activates several windows which causes windows to jump to that window's desktops causing the flickering. It also doesn't use the last active sublime text window which is on the same desktop, it flickers through and find some other window (I think the one that was opened first).