This patch uses xinerama to retrieve info about screens and have the minimap on one screen and the game on the other, even if they are not the same size.
There are some bugs of course :
*if the minimap screen is higher than the main screen, everything is misplaced. I think this comes from viewPosY not being used
*the proposed cmakelists activates xinerama by default, with no check of the OS, I am not used to cmake, but this should be fixed in less than a minute (I am too lazy at the moment to see how to do it the right way)
here is the mantis link :
http://springrts.com/mantis/view.php?id=1637
I hope the patch will be merged one day :)
By the way I have no computer running Windows, so find someone else to port this feature on Windows.
This has been tested with libXinerama 1.0.3 and nvidia proprietary driver (twinview)
Xinerama dualscreen in Linux
Moderator: Moderators
Re: Xinerama dualscreen in Linux
This is great stuff, I finally may find use for my second monitor besides having winamp rest there. I recall someone did a fix that allowed you to define the minimap boundaries on a spanned dual view desktop.
Yes, many widgets etc dont work with it, as they dont seem to like the offset in viewsize.
Yes, many widgets etc dont work with it, as they dont seem to like the offset in viewsize.
Re: Xinerama dualscreen in Linux
I have updated the patch, it is cleaner and should handle left/right according to xinerama position.
I have also tried to see how I can get it to work with the main window on the small screen but with no success. It seems there is a huge mess with gu->viewPosY : it is said it is not used but in fact there are some references in Game/UI/MouseHandler.cpp and some Lua.
Of course brutally replacing 0's next to viewPosX don't work, mouse is then drawn with a vertical offset (when it reaches the top it is drawn viewPosY pixels lower) and there is an offset between selection and actions. If you select an unit and right-click at the same height it will move up.
I have also tried to see how I can get it to work with the main window on the small screen but with no success. It seems there is a huge mess with gu->viewPosY : it is said it is not used but in fact there are some references in Game/UI/MouseHandler.cpp and some Lua.
Of course brutally replacing 0's next to viewPosX don't work, mouse is then drawn with a vertical offset (when it reaches the top it is drawn viewPosY pixels lower) and there is an offset between selection and actions. If you select an unit and right-click at the same height it will move up.
Re: Xinerama dualscreen in Linux
cool thank you very much :)
Re: Xinerama dualscreen in Linux
I think there are problems with the coordinate system:
I managed having all the glViewport calls use the right offset so all graphics are drawn at the right place. But I can't get the mouse to work, and I don't understand where the data comes from and when it is translated from one coord system to an other.
From what I have seen there is
*absolute with (0,0) at the bottom left, in pixels
*absolute with (0,0) at the top left, in pixels
*relative with (0,0) at the top left, in %
*relative with (0,0) in the middle of the viewPort
It is hard to find all the conversions and what data comes from where
can someone tell me how it is meant to work ? Especially when it comes to unit selection and move orders, whatever I do they never match (with a gu->viewPosY difference between them)...
I managed having all the glViewport calls use the right offset so all graphics are drawn at the right place. But I can't get the mouse to work, and I don't understand where the data comes from and when it is translated from one coord system to an other.
From what I have seen there is
*absolute with (0,0) at the bottom left, in pixels
*absolute with (0,0) at the top left, in pixels
*relative with (0,0) at the top left, in %
*relative with (0,0) in the middle of the viewPort
It is hard to find all the conversions and what data comes from where
