Open GoogleCodeExporter opened 8 years ago
I got it to work; here are the necessary changes for anyone else who is
interested:
At the top of PRemoteDroidServerConnection.java, you need to import two new
things:
import java.awt.Dimension;
import java.awt.Toolkit;
Then, in that same file, in the moveMouse function, add this in after x and y
are defined but before having the robot use them:
if (x < 0)
{
x = 0;
}
if (y < 0)
{
y = 0;
}
Toolkit toolkit = Toolkit.getDefaultToolkit();
Dimension dim = toolkit.getScreenSize();
if (x >= dim.width)
{
x = dim.width - 1;
}
if (y >= dim.height)
{
y = dim.height - 1;
}
and that's it! The mouse now stays on the screen no matter what.
Original comment by alan.dav...@gmail.com
on 6 Dec 2010 at 6:32
Original issue reported on code.google.com by
alan.dav...@gmail.com
on 4 Dec 2010 at 10:31