modules/graphics/src/main/java/com/sun/glass/ui/Window.java
Print this page
*** 286,295 ****
--- 286,306 ----
if (this.ptr == 0L) {
throw new IllegalStateException("The window has already been closed");
}
}
+ private boolean cursorUpdateEnabled = true;
+
+ public void setUpdatesCursor(boolean updatesCursor) {
+ cursorUpdateEnabled = updatesCursor;
+ _setUpdatesCursor(this.ptr, updatesCursor);
+ }
+
+ protected void _setUpdatesCursor(long ptr, boolean updatesCursor) {
+ // The native field should be set only on Windows
+ }
+
protected abstract boolean _close(long ptr);
public void close() {
Application.checkEventThread();
if (this.view != null) {
if (this.ptr != 0L) {
*** 1019,1030 ****
--- 1030,1043 ----
* otherwise it is automatically shown.
* @see Cursor#setVisible(boolean)
*/
public void setCursor(Cursor cursor) {
Application.checkEventThread();
+ if (cursorUpdateEnabled) {
_setCursor(this.ptr, cursor);
}
+ }
protected abstract void _toFront(long ptr);
/**
* Bring the window to front in the z-order.
* This method DOES NOT activate the window. To make it active use