summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-01-31 09:15:59 +0100
committerSven Gothel <[email protected]>2023-01-31 09:15:59 +0100
commitd6b4c7dd3546b8de876a9ddcbf5f1f56be8ef281 (patch)
treed1ae563cdaa03c6d6c8b15c6d29c23bd597c490b /src
parent9b1b1df6afe32be3ad514c3e3c7b31c940225e2c (diff)
NEWT Regression: Move superSizeChangedOffThread() back to iOS/MacOS WindowDriver, used to call the super class method.
Regression of commit cfc35549810d3a0fb5eeb866c9450417e48cd8a1 Note to myself: You can't enforce a 'this' method call overridden with a virtual from a subclass.
Diffstat (limited to 'src')
-rw-r--r--src/newt/classes/jogamp/newt/WindowImpl.java12
-rw-r--r--src/newt/classes/jogamp/newt/driver/ios/WindowDriver.java16
-rw-r--r--src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java14
3 files changed, 27 insertions, 15 deletions
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java
index 4018c8b78..565e1e471 100644
--- a/src/newt/classes/jogamp/newt/WindowImpl.java
+++ b/src/newt/classes/jogamp/newt/WindowImpl.java
@@ -5175,18 +5175,6 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
}
}
- protected void sizeChangedOffThread(final boolean defer, final boolean windowUnits, final int newWidth, final int newHeight, final boolean force) {
- if( defer ) {
- new InterruptSource.Thread() {
- @Override
- public void run() {
- WindowImpl.this.sizeChanged(false /* defer */, windowUnits, newWidth, newHeight, force);
- } }.start();
- } else {
- WindowImpl.this.sizeChanged(false /* defer */, windowUnits, newWidth, newHeight, force);
- }
- }
-
private boolean waitForSize(final int w, final int h, final boolean failFast, final long timeOut) {
final DisplayImpl display = (DisplayImpl) screen.getDisplay();
display.dispatchMessagesNative(); // status up2date
diff --git a/src/newt/classes/jogamp/newt/driver/ios/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/ios/WindowDriver.java
index 98700e5fe..280adf71a 100644
--- a/src/newt/classes/jogamp/newt/driver/ios/WindowDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/ios/WindowDriver.java
@@ -187,7 +187,7 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl
}
@Override
- protected void createNativeImpl(boolean[] positionModified) {
+ protected void createNativeImpl(final boolean[] positionModified) {
final AbstractGraphicsConfiguration cfg = GraphicsConfigurationFactory.getFactory(getScreen().getDisplay().getGraphicsDevice(), capsRequested).chooseGraphicsConfiguration(
capsRequested, capsRequested, capabilitiesChooser, getScreen().getGraphicsScreen(), VisualIDHolder.VID_UNDEFINED);
if (null == cfg) {
@@ -585,13 +585,25 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl
} } );
}
}
- super.sizeChangedOffThread(defer, windowUnits, newWidth, newHeight, force);
+ superSizeChangedOffThread(defer, windowUnits, newWidth, newHeight, force);
return true;
} else {
return false;
}
}
+ private void superSizeChangedOffThread(final boolean defer, final boolean windowUnits, final int newWidth, final int newHeight, final boolean force) {
+ if( defer ) {
+ new InterruptSource.Thread() {
+ @Override
+ public void run() {
+ WindowDriver.super.sizeChanged(false /* defer */, windowUnits, newWidth, newHeight, force);
+ } }.start();
+ } else {
+ WindowDriver.super.sizeChanged(false /* defer */, windowUnits, newWidth, newHeight, force);
+ }
+ }
+
//
// Accumulated actions
//
diff --git a/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java
index f7339292f..4326dbc13 100644
--- a/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java
@@ -630,13 +630,25 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl
} } );
}
}
- super.sizeChangedOffThread(defer, windowUnits, newWidth, newHeight, force);
+ superSizeChangedOffThread(defer, windowUnits, newWidth, newHeight, force);
return true;
} else {
return false;
}
}
+ private void superSizeChangedOffThread(final boolean defer, final boolean windowUnits, final int newWidth, final int newHeight, final boolean force) {
+ if( defer ) {
+ new InterruptSource.Thread() {
+ @Override
+ public void run() {
+ WindowDriver.super.sizeChanged(false /* defer */, windowUnits, newWidth, newHeight, force);
+ } }.start();
+ } else {
+ WindowDriver.super.sizeChanged(false /* defer */, windowUnits, newWidth, newHeight, force);
+ }
+ }
+
//
// Accumulated actions
//