[BUG] Cannot restore saved session windows to virtual desktop correctly
-
This thing is painfully unpredictable, so I can't really reproduce this error in exactly the same manner every time. I can only tell you what I have observed in general using the basic bug tracking formula.
Steps to reproduce:
- Make sure you have set the option to save previous session in settings.
- Have about 10-15 different virtual desktops open on Windows. Windows 11 or 10, doesn't matter. Make sure you have at least this amount so that when you use the keyboard shortcut Win + Tab you see at least 10 of them.
- (Optional, for multi-monitors) I don't really know if this is actually necessary or not, but since it's been so long since I set up my PC, make sure that virtual desktops show a new virtual desktop for each monitor you have. Sometimes you can set it so you only see new virtual desktops for the primary monitor, but I'm not sure if this is just for Linux users.
- Create about 8 or so different windows. Set them all around different virtual desktop windows. Doesn't really matter how many tabs you got open in them or anything, just make sure they're where you want them to be.
- Close Vivaldi
- Reopen Vivaldi
- Check to see that all your windows are on the correct virtual desktop and monitor.
Expected behaviour:
- You should see that when you close Vivaldi browser, that it does not move your PC to a different virtual desktop; it should remain in exactly the same spot you close the window from.
- When you open Vivaldi back up, you should see all of your windows reopen right back up on each virtual desktop where they were to begin with.
- (Optional) This isn't an intended action currently, but would be nice if users had an optional flag they could set to have the Vivaldi browser automatically send the PC to the virtual desktop that the user was last using (e.g., to the window that they closed Vivaldi from, if they didn't close the process in task manager or something like that.) Just an idea.
What actually happens:
- When you close Vivaldi, it jumps the PC around between different virtual desktops as it closes each window.
- When Vivaldi opens, it will do either one of three things, seemingly by random:
2a. Performs expected behaviour in step 2 above: When you open Vivaldi back up, you should see all of your windows reopen right back up on each virtual desktop where they were to begin with.
2b. You will see Vivaldi open up some windows in a group of more than the number of expected windows on the previously saved session on the same single virtual desktop: the one you had open when you opened Vivaldi. However, Vivaldi also went and performed the above behaviour on another seemingly random virtual desktop with the remaining windows from the previously saved session.
2c. You will see Vivaldi open up all windows on the same virtual desktop: the one you had open when you opened Vivaldi.
3(&). Vivaldi will, however, remember the particular monitors for each window from the previously saved session, no matter the result of step 2.
(&) EDIT: As far as I know. I haven't been able to fully test this myself.
My guesses as to what might be happening:
- I guess the way that Vivaldi arbitrarily forces the PC to move to different virtual desktops when closing up, is a way such that it can "remember" the window's virtual desktop location. And, sometimes, this action is too fast for it to really be able to reliably use the Windows/DWM/whatever API to collect and store the virtual desktop location as part of the saved session metadata. It might just have null entries, perhaps and the browser might be taking those null entries and just applying logic to the restoration process in such a way that it just drops windows in-place where that metadata value was null.
- Perhaps, the reason that Vivaldi seems to randomly move the PC around to other virtual desktops while closing is because when it performs the "close window" action, it requires the currently focused window to be the window it is closing. So, to close the next window, it focuses to that window which can cause the PC to jump between virtual desktops. Maybe it does this while also doing #1?
-
-
@DoctorG said in [BUG] Cannot restore saved session windows to virtual desktop correctly:
@dazinger Problems with Windows Virtual Desktops is a known bug.
No solution.No solution? For how long?
I am holding onto my basic theory of how Vivaldi handles it under the hood. I know some of Vivaldi is not open source so I don't know if it's possible to contribute toward a fix on Github.
Is Firefox not a good starting point on coming up with a fix?
I use Dexpot for virtual desktops on my Windows 11.
Not sure what that is exactly. Is this similar to DisplayFusion?
-
@dazinger Please report issue to Vivaldi bug tracker. Once that is done, share the bug number (beginning with VB-) you got by bug report mail. Thanks for helping us making Vivaldi better.
-
@DoctorG Done.