summaryrefslogtreecommitdiffstats
path: root/src/newt/classes
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2019-11-22 17:20:00 +0100
committerSven Gothel <[email protected]>2019-11-22 17:20:00 +0100
commitbb83bd2df5723ed145f59e9bd5d212de6c4daba8 (patch)
tree55526d2d0f52b7ac36408d312590e57cd2200d13 /src/newt/classes
parent3dcfa24384078fca34ce3cc877649f7e2c2c084b (diff)
Bug 1156: GBM: Fixing native GBM code, surviving initialization
Diffstat (limited to 'src/newt/classes')
-rw-r--r--src/newt/classes/jogamp/newt/driver/egl/gbm/DisplayDriver.java6
-rw-r--r--src/newt/classes/jogamp/newt/driver/egl/gbm/WindowDriver.java20
2 files changed, 16 insertions, 10 deletions
diff --git a/src/newt/classes/jogamp/newt/driver/egl/gbm/DisplayDriver.java b/src/newt/classes/jogamp/newt/driver/egl/gbm/DisplayDriver.java
index e83e8e2a7..4d9835826 100644
--- a/src/newt/classes/jogamp/newt/driver/egl/gbm/DisplayDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/egl/gbm/DisplayDriver.java
@@ -29,7 +29,6 @@ package jogamp.newt.driver.egl.gbm;
import com.jogamp.nativewindow.AbstractGraphicsDevice;
import com.jogamp.nativewindow.NativeWindowException;
-import com.jogamp.nativewindow.egl.EGLGraphicsDevice;
import com.jogamp.opengl.GLProfile;
import jogamp.newt.DisplayImpl;
@@ -51,7 +50,7 @@ public class DisplayDriver extends DisplayImpl {
if (!WindowDriver.initIDs()) {
throw new NativeWindowException("Failed to initialize egl.gbm Window jmethodIDs");
}
- drmHandle = initDrm();
+ drmHandle = initDrm(DEBUG);
}
static void validateDrm() {
@@ -62,7 +61,6 @@ public class DisplayDriver extends DisplayImpl {
public static void initSingleton() {
// just exist to ensure static init has been run
- validateDrm();
}
private static void shutdownHook() {
@@ -100,7 +98,7 @@ public class DisplayDriver extends DisplayImpl {
// Internals only
//
private static native boolean initIDs();
- private static native long initDrm();
+ private static native long initDrm(boolean verbose);
private static native void freeDrm(long drmHandle);
private static native long OpenGBMDisplay0(long drmHandle);
diff --git a/src/newt/classes/jogamp/newt/driver/egl/gbm/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/egl/gbm/WindowDriver.java
index 41f1bc359..79c0b0dac 100644
--- a/src/newt/classes/jogamp/newt/driver/egl/gbm/WindowDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/egl/gbm/WindowDriver.java
@@ -49,8 +49,8 @@ public class WindowDriver extends WindowImpl {
}
public WindowDriver() {
- linuxMouseTracker = LinuxMouseTracker.getSingleton();
- linuxEventDeviceTracker = LinuxEventDeviceTracker.getSingleton();
+ linuxMouseTracker = null; // LinuxMouseTracker.getSingleton();
+ linuxEventDeviceTracker = null; // LinuxEventDeviceTracker.getSingleton();
windowHandleClose = 0;
}
@@ -162,8 +162,12 @@ public class WindowDriver extends WindowImpl {
}
windowHandleClose = nativeWindowHandle;
- addWindowListener(linuxEventDeviceTracker);
- addWindowListener(linuxMouseTracker);
+ if( null != linuxEventDeviceTracker ) {
+ addWindowListener(linuxEventDeviceTracker);
+ }
+ if( null != linuxMouseTracker ) {
+ addWindowListener(linuxMouseTracker);
+ }
focusChanged(false, true);
}
@@ -172,8 +176,12 @@ public class WindowDriver extends WindowImpl {
final DisplayDriver display = (DisplayDriver) getScreen().getDisplay();
final EGLGraphicsDevice eglDevice = (EGLGraphicsDevice) getGraphicsConfiguration().getScreen().getDevice();
- removeWindowListener(linuxMouseTracker);
- removeWindowListener(linuxEventDeviceTracker);
+ if( null != linuxMouseTracker ) {
+ removeWindowListener(linuxMouseTracker);
+ }
+ if( null != linuxEventDeviceTracker ) {
+ removeWindowListener(linuxEventDeviceTracker);
+ }
if( 0 != windowHandleClose ) {
CloseWindow0(display.getGBMHandle(), windowHandleClose);