summaryrefslogtreecommitdiffstats
path: root/src/test/com/jogamp/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2019-12-09 02:24:44 +0100
committerSven Gothel <[email protected]>2019-12-09 02:24:44 +0100
commit3e92d34de3672d7f5e401ed6181bb55a58bdf4b6 (patch)
tree7dada4b8e816e8ef5c9a7386b17239a075b99536 /src/test/com/jogamp/opengl
parent5047217ff8366b0d3280e478aac6c711170d7063 (diff)
Bug 1156: NEWT Window: Better handling of fixed console case: Not resizable and not repositionable.
Our two fixed size and position console cases 'bcm.egl' and 'egl.gbm' (drm.gbm) only operate in a console like fullscreen mode. We should earmark and expose this behavior, as well as handle it by not waiting for a position / size and not attempting to change position and size. Reducing WindowImpl.minimumReconfigStateMask to bare minimum values: STATE_MASK_VISIBLE | STATE_MASK_FOCUSED; New WindowImpl.mutableSizePosReconfigStateMask extends WindowImpl.minimumReconfigStateMask, representing previous values: STATE_MASK_VISIBLE | STATE_MASK_FOCUSED | STATE_MASK_FULLSCREEN | STATE_MASK_RESIZABLE | STATE_MASK_REPOSITIONABLE; All WindowDriver implementations previously using WindowImpl.minimumReconfigStateMask are now using WindowImpl.mutableSizePosReconfigStateMask but the explicit console driver named above. I would have liked to add the STATE_BIT_FULLSCREEN to the current stateMask to notify this semantics, however this would have lead to more code changes as our fullscreen mode assumes to be 'on top' of the normal mode. Here the normal mode is essentially fullscreen and no back/forth fullscreen setting is useful or allowed. Therefore, both fixed size & position console driver won't expose themselves as being in fullscreen mode.
Diffstat (limited to 'src/test/com/jogamp/opengl')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLContextSurfaceLockNEWT.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLContextSurfaceLockNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLContextSurfaceLockNEWT.java
index 8d26ebb82..af329dfa7 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLContextSurfaceLockNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLContextSurfaceLockNEWT.java
@@ -48,7 +48,7 @@ import com.jogamp.opengl.test.junit.util.UITestCase;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestGLContextSurfaceLockNEWT extends UITestCase {
- static final int demoSize = 64;
+ static final int demoSizePos = 80;
public abstract class MyRunnable implements Runnable {
final Object postSync;
@@ -77,6 +77,8 @@ public class TestGLContextSurfaceLockNEWT extends UITestCase {
System.err.println("Animatr "+id+", count "+frameCount+": PRE: "+Thread.currentThread().getName());
for(int c=0; c<frameCount; c++) {
+ System.err.println("Animatr "+id+": Action "+c+" / "+frameCount+": "+Thread.currentThread().getName());
+
glad.display();
}
@@ -107,8 +109,11 @@ public class TestGLContextSurfaceLockNEWT extends UITestCase {
System.err.println("Resizer "+id+", count "+actionCount+": PRE: "+Thread.currentThread().getName());
for(int c=0; c<actionCount; c++) {
+ final int _c = c;
win.runOnEDTIfAvail(true, new Runnable() {
+ int i = _c;
public void run() {
+ System.err.println("Resizer "+id+": Action "+i+" / "+actionCount+": "+Thread.currentThread().getName());
// Normal resize, may trigger immediate display within lock
win.setSize(win.getSurfaceWidth()+1, win.getSurfaceHeight()+1);
@@ -188,7 +193,8 @@ public class TestGLContextSurfaceLockNEWT extends UITestCase {
glWindow.addGLEventListener(new GearsES2(0));
glWindow.addGLEventListener(myEventCounter);
- glWindow.setSize(demoSize, demoSize);
+ glWindow.setPosition(demoSizePos, demoSizePos);
+ glWindow.setSize(demoSizePos, demoSizePos);
glWindow.setVisible(true);
final String currentThreadName = Thread.currentThread().getName();