fix abnormal situation on Mac II when moving mouse out of screen

This commit is contained in:
Jesús A. Álvarez 2016-07-02 14:47:06 +02:00
parent d1a0721b40
commit 8ad866b0dc

View File

@ -1941,6 +1941,16 @@ static dispatch_once_t onceToken;
#pragma mark - Mouse
- (void)setMouseX:(NSInteger)x Y:(NSInteger)y {
if (x > vMacScreenWidth) {
x = vMacScreenWidth;
} else if (x < 0) {
x = 0;
}
if (y > vMacScreenHeight) {
y = vMacScreenHeight;
} else if (y < 0) {
y = 0;
}
MyMousePositionSet(x, y);
}