Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Bug: window order lost between desktops

kingcu
2010-09-11
2013-05-21
  • kingcu
    kingcu
    2010-09-11

    Windows Vista Ultimate edition 32 bit
    VirtuaWin 4.3 with unicode support

    Install virtuawin 4.3, then set the number of desktops to two. So we have desktop 1 and desktop 2. On desktop 1, first open Windows Explorer, then open Firefox, now there are two windows on desktop 1 in the following order: Windows Explorer -> Firefox.

    Now, switch to desktop 2, open Firefox; then switch back to desktop 1, and here is the bug: Firefox on desktop 1 is now at the first position, instead of the second position as it supposed to be.

     
  • Is this a bug? An event has occurred which has raised the profile of Firefox, it should now be raised and this behaviour is explicitly coded this way - i.e. this is a feature.

    What does everyone else think? Personal I prefer the current behaviour, but then I would as I implemented it :-)

     
  • kingcu
    kingcu
    2010-09-12

    Thanks for the quick response. When talking about virtual desktop software, you would expect that it creates multiple desktops with no interference between the desktops. That should be the No. 1 rule for a virtual desktop software. Obviously, window order gets changed on one desktop because of some user interaction on another desktop violates this rule.

    In reality, when setting up my working desktop, I have Outlook at the 1st position for my working emails, then Windows explorer, then Firefox (for googling, looking up APIs), then Eclipse for programming. During daily work, I will switch between these windows a number of times. If the order of the windows stays the same, that's pretty easy: just move the mouse to a rough position on the task bar and click; however, if the order of the windows will change, that's gonna be a real pain.

     
  • So by order do you mean the z-order or the taskbar order? At first I thought you meant the z-order, but your second post suggests the taskbar button order, in which case I am in agreement, the order of taskbar buttons should not change - as long as you have configured VirtuaWin correctly.

    What is your current setting of 'On desktop change preserve' setting on the Expert tab? If this is Z-order the please change to one with taskbar order, if you have not already done so try one of the Dynamic ones as this could fix the problem.

    Also the scenario you raise is a particularly tricky one, caused by the firefox window being already visible - can you confirm that if you reproduce the issue as in your first note and then go back to desktop 2 and then back to 1 the order of the taskbar buttons is now correct? This is an example of the many 'lesser of two evils' type choices VW has to make because Windows does not have a proper API for these operations, VW has to bodge the behaviour.

    The only potential way to fix this would be to hide firefox so that VW can restore all windows in the correct order, but this would cause more flicker, show down performance and lead to potentially more serious window focus issues. And this would not be full-proof, far from it, e.g. dragging the firefox window back to desktop 1 using the mouse is an even worse scenario because VW cannot mess around with the focus for fear of making the mouse dropping the window.

    Thanks for documenting this issue with a simple scenario, please try the dynamic taskbar settings and let me know whether this resolves the problem. If you cannot resolve the issue then I'll have a look, but no promises…

     
  • kingcu
    kingcu
    2010-09-13

    It's the taskbar order that matters more to me. I tried all 5 options for the 'On desktop change preserve' setting on the Expert tab, unfortunately, none of them preserve the taskbar order.

    One more observation: if that setting is set to one of the two options that begin with "Static", after you close the Firefox window on desktop 2, the Firefox window on desktop 1 is restored to the previous taskbar position; while if that setting is set to the other 3 options, after Firefox is closed on desktop 2, the Firefox on desktop 1 stays at the 1st position on the taskbar.

     
  • Anandajoti
    Anandajoti
    2010-09-26

    Windows Vista Home edition 32 bit
    VirtuaWin 4.3 with unicode support

    I am having the very same problem, I also followed the instructions given here and nothing works, the task bar is always being rearranged. This actually makes it difficult to work with for me, because I place the icons and expect them to be in the same place when I retunr, not scrambled. Is it a bug?

     
  • kingcu
    kingcu
    2010-09-26

    If you read above posts by bjasspa, this is actually a "feature".

     
  • Because this is referring to the taskbar order (not the z-order) this is a bug. But as there is no official Windows interface to control the order the chances are the problem cannot be fixed. What I need is explicit examples, as outlined by kingcu in his first post, which I can use to reproduce the issue.

    Having thought about this issue a little more, using one of the Dynamic settings is going to make things worse as it will make VW remember the new order. If you use one of the 'Static taskbar' settings VW will remember a specific order and always try to preserve that order (if you start VW at login the order should be the order you want), it may seem like it gets the order wrong from time to time but if to go to another desktop and back again (without dragging a window or activating one) it should fix the problem.

    If you find this is the case then the chances are that I can't fix the problem you are seeing because to do so would break other things. But I'm still interested in the examples because I may be able to fix it.

     
  • Anandajoti
    Anandajoti
    2010-09-27

    Hi bjasspa, and thanks for the reply.

    When it came in I actually had VW switched off, so I restarted it (more about this later).

    The order in the Taskbar at the time of restarting was Free Commander, Firefox, Pale Moon. I switched to desktop 2 (I only have 2) with Firefox at the top of the z-order and back. The order is now Firefox, FC, Pale Moon.

    Next I fixed FC to appear on all desktops, and rearranged all the icons in the taskbar to the original order. From FC being the highest in the z-order I then swithed back and forth to desktop 1. Same result: Firefox, FC, PM.

    The setting in the expert tab is static taskbar order.

    Now why was it switched off anyway? It keeps losing a couple of the windows. One is STDU Viewer, which simply disappears, but has not gone away, and another instance cannot be loaded. A second one is a AutoHotkey GUI I wrote myself. Disappears, and the only way to get them back is to exit VW.

     
  • VirtuaWin has 3 basic modes of operation w.r.t. taskbar button order:

    a. Don't care about the taskbar button order - set preserve to Z-order only: The order of the buttons can and will change on desktop change.

    b. Statically preserve the order of the taskbar buttons - set preserve to a Static taskbar option: VirtuaWin internally creates a button order and sticks to the order forever.

    c. Dynamically preserve the order of the taskbar buttons - set preserve to a Dynamic taskbar option: VirtuaWin attempts to retrieve the order of buttons just before each desktop change and restores to that order when you next go back to that desktop.

    You are currently using a static option so changing the button order using another tool will be pointless, virtuawin will always use its own internal order, defined by when it first discovered each window. In simple terms, start VW with no other windows, now whenever you create a new window virtuawin will add it to the end of its list and therefore to the end of the taskbar button list. The problem is, if you start VW with many windows already open VW will 'discover' the existing windows in a random order (thanks to the Window enumWindows call) so once you change desktops VW will restore the buttons to that random order.

    Solution here is to start VW right at the beginning, then the order will be as you created them (which is usually correct), any temporary muddles (caused by process activation or window dragging etc) will automatically be corrected next time you change desktops because VW uses a static list.

    Using a dynamic order option (which does not work on Win7 because Microsoft have kindly reimplemented the taskbar without providing an external api! Anyone who knows of one please let me know) will solve the 'startup VW with many windows already open' issue because VW will get the order before changing desktops for the first time. However this option will make temporary order muddle issues worse because they will become permanent changes - no real solution here because Vw does not know the order has been muddled :-( 

    Sorry for the long post, hopefully the explanation of whats going on will help you choose the most appropriate option for you.

     
  • Anandajoti
    Anandajoti
    2010-10-07

    Hi bjasspa, thanks for taking the time to make all that clear. Not an easy one to solve in various ways, because we may open windows in a different order to what we want on the taskbar, and windows may need to be closed occasionally, disturbing the order.

    I have tried 1/2 dozen other virtual desktops by now and most have the same problem. One or two seem to have got around it somehow. But not easy, of course, especially when MS are not being co-operative.