Problem description: Having a dual/multi monitor setup active while playing Starcraft 2 and your mouse won't contain/lock to the gamewindow.
Solution:
First we need to understand one thing. We are not trying to Jail the mouse, this is a bad habbit a lot of guy's try at first, but its the worst way we can try to solve a problem. It costs a lot of CPU, it makes games lagging etc.. the reson for this is that everytime the mouse is moved the jailing function test if the mouse position is valid or not.
So what we try to accomplish is not "jailing" the mouse to a specific region, we're allowing the mouse to cross/extend his "original" region with some tricks.
So first of all what we need to do is to set our Screenregions for our MultiMonitor setup
The default Setup normaly looks something like this:
What we'll do is we move or Screen1 to a position far away like this ________
| Screen0 |
________
________
| Screen1 |
________
(sorry for the bad drawings)
to accomplish this goal we first need to put both monitors as a Seperate X-Screen without Xinerama then we gonna need to edit the xorg.conf (/etc/X11/xorg.conf)
find in Section "ServerLayout" following the lines:
now save the file and restart your Desktop (ctrl+alt+backspace). Please remeber, do NOT edit your config now with any GUI tools they usualy reset the changes we made!
As you can see after the Desktop restarting you cannot move the mouse accross the screens any more. So what we've did is to give the mouse a natural contain to our Main X-Screen.
The next step is quite easy, go to http://ds.mcbf.net/wiki/DualscreenMouseUtils and download the latest release of dualscreen-mouse-utils (currently 0.5) .
Extract the files and execute the make command to compile this tool, no copy the mouse-switchscreen mouse-wrapscreen mouse-wrapscreen.sh file to /usr/local/bin/.
After executing mouse-wrapscreen.sh you can cross from one monitor to another, start it again and the mouse is back in his original contain.
Important Information
Tips are provided by the CrossOver Community and Advocates. They are not
intended to be used for official CodeWeavers Support. For that, please visit our
official support pages.
CodeWeavers or its third-party tools process personal data (e.g. browsing data or IP addresses) and use cookies or other identifiers, which are necessary for its functioning and required to achieve the purposes illustrated in our Privacy Policy. You accept the use of cookies or other identifiers by clicking the Acknowledge button.