FIXED 5.0.11 - Multiple display problem - vanishing tabs...

john connor

Member
So I set up 2 monitors (laptop and free-standing) as an extended desktop and thought it was wonderful. I put the map on my main monitor (indeed, I couldn't move the map, it just selects itself whatever is your main monitor, it seems) and put the tabs I wanted on the other screen. Messed around a bit. Great. Next time I came back to it (from a save) the tabs I'd moved around were all missing. I click on them, they grey out, but they are NOWHERE to be found, on either monitor. I reboot. No diff. I go back to laptop monitor only. No diff. Those tabs have gone forever!!!! Unless you have a good suggestion, Dave, I fear I will have to reinstall EVERYTHING. because it's broke now. So much for my multiple monitors fun.....

4.png
 

john connor

Member
'Solved' this myself now. What happened is that the game remembers where you've put the tabs as if the displays were in that exact position always, even if you change the positions. I had set the screens up one above the other, saved, left the game. Then when I came back in I changed the displays to side by side, opened the game and tabs were missing. In fact, the game was putting them on the display as if it were one above the other, though the top monitor now no longer existed, because I had them side by side. That's what it remembered though - one above the other. So I set it up like that again and there they all were!! I dragged them all back down to the main screen again, THEN re-arranged the monitors side by side and put the tabs where I wanted them. Perhaps it's not a bug. But it will pay to remember, if you're messing around with multiple monitors, that this is how the game behaves. It does mean, for example, that if you set the game up on two monitors, with tabs on one and map on another, then close it leaving them like that, then (because you go out with your laptop, say) if you want to play as normal on one screen only, you will find that the tabs are all stuck on the virtual second screen. So, if you want flexibility, always manually move all your tabs back to the map screen before you quit!! (And this includes the types of tab not accessible from the side bar tab selector - the force info tab {and a shift click extra force info tab if you used one} and the task edit tab - you must open these and drag them back to your map screen before you quit!!)
 
Last edited:

Dave 'Arjuna' O'Connor

Panther Games Designer
Great detective work Peter. I think it would be better if the code tested to see if the saved positions were still in the active screen area. I'll get to this after the high priority tasks I have on my plate
 

CaptEggman

Member
One additional note, Dave.

The problem John describes can be reproduced easily. On top of that, if you uninstall CO2, reinstall it and try again, the old positions are still saved! This is what threw me off initially, because the newly installed game had never been run on multiple monitors. I hooked up my second screen, started the game and there my missing OOB was - on a screen it had never been on before!

Good luck on the bugfix!
 

Dave 'Arjuna' O'Connor

Panther Games Designer
I have sorted out this one but it will need testing. What I have now done is to add a call to IsWithinVirtualScreen() inside each of the dialogs after it retrieves the position from the registry. This function checks to see if the stored position is within the area of all the monitors. If it is NOT within the virtual screen (ie within all the monitors) then it will revert the position to (0,0) - ie top left of screen.

FIXED
 
Top