stop updating cursor all the time and only continue animation if mouse is inside window

This commit is contained in:
Brian Matzon 2009-11-26 22:44:17 +00:00
parent bbe74afddb
commit 663a7cf235
2 changed files with 1 additions and 2 deletions

View File

@ -630,7 +630,7 @@ public class Mouse {
*/
public static void updateCursor() {
synchronized (OpenGLPackageAccess.global_lock) {
if (emulateCursorAnimation && currentCursor != null && currentCursor.hasTimedOut()) {
if (emulateCursorAnimation && currentCursor != null && currentCursor.hasTimedOut() && Mouse.isInsideWindow()) {
currentCursor.nextCursor();
try {
setNativeCursor(currentCursor);

View File

@ -761,7 +761,6 @@ final class WindowsDisplay implements DisplayImplementation {
private static native int defWindowProc(long hwnd, int msg, long wParam, long lParam);
private void checkCursorState() {
updateCursor();
updateClipping();
}