aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2019-12-04 22:42:12 +0100
committerSven Gothel <[email protected]>2019-12-04 22:42:12 +0100
commitc7778616ef7706461ee0b09e20591f5a6e4ea363 (patch)
tree2bba2dcbf34b70c0ffda18561f8ddb5ba48035a3 /src
parent66976571abed5f14db5de9975ce08d62cfecc2c8 (diff)
Bug 1408: NEWT DisplayImpl PointerIcon: Property 'newt.disable.PointerIcon' disables PointerIcon usage in general.
Diffstat (limited to 'src')
-rw-r--r--src/newt/classes/jogamp/newt/DisplayImpl.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/newt/classes/jogamp/newt/DisplayImpl.java b/src/newt/classes/jogamp/newt/DisplayImpl.java
index 62550ee0c..7fdcb4d7d 100644
--- a/src/newt/classes/jogamp/newt/DisplayImpl.java
+++ b/src/newt/classes/jogamp/newt/DisplayImpl.java
@@ -38,6 +38,7 @@ import com.jogamp.common.ExceptionUtils;
import com.jogamp.common.nio.Buffers;
import com.jogamp.common.util.IOUtil;
import com.jogamp.common.util.InterruptedRuntimeException;
+import com.jogamp.common.util.PropertyAccess;
import com.jogamp.common.util.ReflectionUtil;
import com.jogamp.newt.Display;
import com.jogamp.newt.NewtFactory;
@@ -64,6 +65,7 @@ import com.jogamp.nativewindow.util.Point;
import com.jogamp.nativewindow.util.PointImmutable;
public abstract class DisplayImpl extends Display {
+ protected static final boolean DISABLE_POINTER_ICON = PropertyAccess.isPropertyDefined("newt.disable.PointerIcon", true);
private static int serialno = 1;
private static final boolean pngUtilAvail;
@@ -240,7 +242,11 @@ public abstract class DisplayImpl extends Display {
if( getNativePointerIconForceDirectNIO() && !Buffers.isDirect(pixels) ) {
throw new IllegalArgumentException("pixel buffer is not direct "+pixels);
}
- return createPointerIconImpl(pixelformat, width, height, pixels, hotX, hotY);
+ if( !DISABLE_POINTER_ICON ) {
+ return createPointerIconImpl(pixelformat, width, height, pixels, hotX, hotY);
+ } else {
+ return 0;
+ }
}
/**