stop updating cursor all the time and only continue animation if mouse is inside window
This commit is contained in:
parent
bbe74afddb
commit
663a7cf235
|
@ -630,7 +630,7 @@ public class Mouse {
|
||||||
*/
|
*/
|
||||||
public static void updateCursor() {
|
public static void updateCursor() {
|
||||||
synchronized (OpenGLPackageAccess.global_lock) {
|
synchronized (OpenGLPackageAccess.global_lock) {
|
||||||
if (emulateCursorAnimation && currentCursor != null && currentCursor.hasTimedOut()) {
|
if (emulateCursorAnimation && currentCursor != null && currentCursor.hasTimedOut() && Mouse.isInsideWindow()) {
|
||||||
currentCursor.nextCursor();
|
currentCursor.nextCursor();
|
||||||
try {
|
try {
|
||||||
setNativeCursor(currentCursor);
|
setNativeCursor(currentCursor);
|
||||||
|
|
|
@ -761,7 +761,6 @@ final class WindowsDisplay implements DisplayImplementation {
|
||||||
private static native int defWindowProc(long hwnd, int msg, long wParam, long lParam);
|
private static native int defWindowProc(long hwnd, int msg, long wParam, long lParam);
|
||||||
|
|
||||||
private void checkCursorState() {
|
private void checkCursorState() {
|
||||||
updateCursor();
|
|
||||||
updateClipping();
|
updateClipping();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue