set native cursor to null at Mouse.destroy()
This commit is contained in:
parent
44cbb3ca02
commit
f996e36d6c
|
@ -282,11 +282,17 @@ public class Mouse {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* "Destroy" the mouse. Remember to reset the native cursor if
|
* "Destroy" the mouse.
|
||||||
* setNativeCursor() has been called with anything else than null.
|
|
||||||
*/
|
*/
|
||||||
public static void destroy() {
|
public static void destroy() {
|
||||||
assert currentCursor == null;
|
if (currentCursor != null) {
|
||||||
|
try {
|
||||||
|
setNativeCursor(null);
|
||||||
|
} catch (Exception e) {
|
||||||
|
if (Sys.DEBUG)
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!created)
|
if (!created)
|
||||||
return;
|
return;
|
||||||
created = false;
|
created = false;
|
||||||
|
@ -530,6 +536,8 @@ public class Mouse {
|
||||||
try {
|
try {
|
||||||
setNativeCursor(currentCursor);
|
setNativeCursor(currentCursor);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
if (Sys.DEBUG)
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue