Windows: Make sure that the cursor position doesn't jump when switching grab mode
This commit is contained in:
parent
92b3a7d282
commit
c6ba2c66b1
|
@ -142,12 +142,12 @@ final class WindowsAWTInput extends AbstractAWTInput {
|
||||||
|
|
||||||
public synchronized void grabMouse(boolean grab) {
|
public synchronized void grabMouse(boolean grab) {
|
||||||
if (grab != isGrabbed()) {
|
if (grab != isGrabbed()) {
|
||||||
super.grabMouse(grab);
|
|
||||||
/* Only ungrab since grabbing can only occur in processInput
|
/* Only ungrab since grabbing can only occur in processInput
|
||||||
* when the hwnd is guaranteed valid
|
* when the hwnd is guaranteed valid
|
||||||
*/
|
*/
|
||||||
if (cached_mouse != null && !grab)
|
if (cached_mouse != null && !grab)
|
||||||
grab(grab);
|
grab(grab);
|
||||||
|
super.grabMouse(grab);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue