aboutsummaryrefslogtreecommitdiffstats
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
parent66976571abed5f14db5de9975ce08d62cfecc2c8 (diff)
Bug 1408: NEWT DisplayImpl PointerIcon: Property 'newt.disable.PointerIcon' disables PointerIcon usage in general.
-rw-r--r--make/scripts/test-demo-launcher0.sh2
-rw-r--r--src/newt/classes/jogamp/newt/DisplayImpl.java8
2 files changed, 9 insertions, 1 deletions
diff --git a/make/scripts/test-demo-launcher0.sh b/make/scripts/test-demo-launcher0.sh
index 330c71230..4004726a7 100644
--- a/make/scripts/test-demo-launcher0.sh
+++ b/make/scripts/test-demo-launcher0.sh
@@ -49,6 +49,8 @@ X_ARGS="-Djava.awt.headless=true $X_ARGS"
#D_ARGS="-Djogl.debug=all"
#D_ARGS="-Djogl.debug=all -Dnewt.debug=all -Djogl.debug.DebugGL"
#D_ARGS="-Dnewt.debug=all"
+D_ARGS="-Dnewt.debug.Display.PointerIcon -Dnewt.disable.PointerIcon"
+
#D_ARGS="-Dnewt.disable.LinuxKeyEventTracker -Dnewt.disable.LinuxMouseTracker"
#D_ARGS="-Dnewt.disable.LinuxKeyEventTracker"
#D_ARGS="-Dnativewindow.debug=all -Djogl.debug=all -Dnewt.debug=all -Dnewt.disable.LinuxKeyEventTracker -Dnewt.disable.LinuxMouseTracker"
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;
+ }
}
/**