summaryrefslogtreecommitdiffstats
path: root/src/newt
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt')
-rw-r--r--src/newt/classes/jogamp/newt/WindowImpl.java21
-rw-r--r--src/newt/classes/jogamp/newt/driver/awt/WindowDriver.java2
-rw-r--r--src/newt/classes/jogamp/newt/driver/ios/WindowDriver.java2
-rw-r--r--src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java2
-rw-r--r--src/newt/native/IOSNewtUIWindow.m4
-rw-r--r--src/newt/native/MacNewtNSWindow.m4
-rw-r--r--src/newt/native/WindowsWindow.c4
-rw-r--r--src/newt/native/X11Display.c6
-rw-r--r--src/newt/native/X11Window.c2
9 files changed, 21 insertions, 26 deletions
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java
index 953935071..0f30f9458 100644
--- a/src/newt/classes/jogamp/newt/WindowImpl.java
+++ b/src/newt/classes/jogamp/newt/WindowImpl.java
@@ -4607,8 +4607,6 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
/**
* Triggered by implementation's WM events to update the insets.
- *
- * @param defer
* @param left insets, -1 ignored
* @param right insets, -1 ignored
* @param top insets, -1 ignored
@@ -4617,7 +4615,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
* @see #getInsets()
* @see #updateInsetsImpl(Insets)
*/
- protected void insetsChanged(final boolean defer, final int left, final int right, final int top, final int bottom) {
+ protected final void insetsChanged(final int left, final int right, final int top, final int bottom) {
if ( left >= 0 && right >= 0 && top >= 0 && bottom >= 0 ) {
final boolean changed = left != insets.getLeftWidth() || right != insets.getRightWidth() ||
top != insets.getTopHeight() || bottom != insets.getBottomHeight();
@@ -4625,12 +4623,12 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
if( blockInsetsChange || isUndecorated() ) {
if(DEBUG_IMPLEMENTATION) {
if( changed ) {
- System.err.println("Window.insetsChanged (defer: "+defer+"): Skip insets change "+insets+" -> "+new Insets(left, right, top, bottom)+" (blocked "+blockInsetsChange+", undecoration "+isUndecorated()+")");
+ System.err.println("Window.insetsChanged: Skip insets change "+insets+" -> "+new Insets(left, right, top, bottom)+" (blocked "+blockInsetsChange+", undecoration "+isUndecorated()+")");
}
}
} else if ( changed ) {
if(DEBUG_IMPLEMENTATION) {
- System.err.println("Window.insetsChanged (defer: "+defer+"): Changed "+insets+" -> "+new Insets(left, right, top, bottom));
+ System.err.println("Window.insetsChanged: Changed "+insets+" -> "+new Insets(left, right, top, bottom));
}
insets.set(left, right, top, bottom);
}
@@ -4786,18 +4784,15 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
}
/**
* Triggered by implementation's WM events to update the client-area position, size, insets and maximized flags.
- *
- * @param defer
* @param left insets, -1 ignored
* @param right insets, -1 ignored
* @param top insets, -1 ignored
* @param bottom insets, -1 ignored
* @param visibleChange -1 ignored, 0 invisible, > 0 visible
*/
- protected final void insetsVisibleChanged(final boolean defer,
- final int left, final int right, final int top, final int bottom,
- final int visibleChange) {
- insetsChanged(defer, left, right, top, bottom);
+ protected final void insetsVisibleChanged(final int left,
+ final int right, final int top, final int bottom, final int visibleChange) {
+ insetsChanged(left, right, top, bottom);
if( 0 <= visibleChange ) { // ignore visible < 0
visibleChanged(0 < visibleChange);
}
@@ -4827,7 +4822,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
final boolean force) {
sizeChanged(defer, newWidth, newHeight, force);
positionChanged(defer, newX, newY);
- insetsChanged(defer, left, right, top, bottom);
+ insetsChanged(left, right, top, bottom);
if( 0 <= focusChange ) { // ignore focus < 0
focusChanged(defer, 0 < focusChange);
}
@@ -4864,7 +4859,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
if( 0 <= maxHorzChange && 0 <= maxVertChange ) {
maximizedChanged(0 < maxHorzChange, 0 < maxVertChange);
}
- insetsChanged(defer, left, right, top, bottom);
+ insetsChanged(left, right, top, bottom);
if( 0 <= visibleChange ) { // ignore visible < 0
visibleChanged(0 < visibleChange);
}
diff --git a/src/newt/classes/jogamp/newt/driver/awt/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/awt/WindowDriver.java
index 523fbf336..b72481f1b 100644
--- a/src/newt/classes/jogamp/newt/driver/awt/WindowDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/awt/WindowDriver.java
@@ -287,7 +287,7 @@ public class WindowDriver extends WindowImpl {
setCanvasSizeImpl(width, height);
awtContainer.setVisible( true );
final Insets contInsets = awtContainer.getInsets();
- insetsChanged(false, contInsets.left, contInsets.right, contInsets.top, contInsets.bottom);
+ insetsChanged(contInsets.left, contInsets.right, contInsets.top, contInsets.bottom);
} else {
awtContainer.setVisible( false );
}
diff --git a/src/newt/classes/jogamp/newt/driver/ios/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/ios/WindowDriver.java
index 7706b9fe1..f84afc8f8 100644
--- a/src/newt/classes/jogamp/newt/driver/ios/WindowDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/ios/WindowDriver.java
@@ -609,7 +609,7 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl
}
sizeChanged(defer, newWidth, newHeight, force);
screenPositionChanged(defer, newX, newY);
- insetsChanged(defer, left, right, top, bottom);
+ insetsChanged(left, right, top, bottom);
if( !withinLiveResize && resizeAnimatorPaused ) {
resizeAnimatorPaused = false;
if( null!=lh ) {
diff --git a/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java
index d41411e02..631dfced9 100644
--- a/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java
@@ -614,7 +614,7 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl
}
sizeChanged(defer, newWidth, newHeight, force);
screenPositionChanged(defer, newX, newY);
- insetsChanged(defer, left, right, top, bottom);
+ insetsChanged(left, right, top, bottom);
if( !withinLiveResize && resizeAnimatorPaused ) {
resizeAnimatorPaused = false;
if( null!=lh ) {
diff --git a/src/newt/native/IOSNewtUIWindow.m b/src/newt/native/IOSNewtUIWindow.m
index c9895a994..1900882d7 100644
--- a/src/newt/native/IOSNewtUIWindow.m
+++ b/src/newt/native/IOSNewtUIWindow.m
@@ -444,7 +444,7 @@ static jmethodID windowRepaintID = NULL;
sizeChangedID = (*env)->GetMethodID(env, clazz, "sizeChanged", "(ZIIZ)V");
updatePixelScaleID = (*env)->GetMethodID(env, clazz, "updatePixelScale", "(ZFFFZ)V");
visibleChangedID = (*env)->GetMethodID(env, clazz, "visibleChanged", "(Z)V");
- insetsChangedID = (*env)->GetMethodID(env, clazz, "insetsChanged", "(ZIIII)V");
+ insetsChangedID = (*env)->GetMethodID(env, clazz, "insetsChanged", "(IIII)V");
sizeScreenPosInsetsChangedID = (*env)->GetMethodID(env, clazz, "sizeScreenPosInsetsChanged", "(ZIIIIIIIIZZ)V");
screenPositionChangedID = (*env)->GetMethodID(env, clazz, "screenPositionChanged", "(ZII)V");
focusChangedID = (*env)->GetMethodID(env, clazz, "focusChanged", "(ZZ)V");
@@ -691,7 +691,7 @@ static jmethodID windowRepaintID = NULL;
DBG_PRINT( "updateInsets: [ l %d, r %d, t %d, b %d ]\n", cachedInsets[0], cachedInsets[1], cachedInsets[2], cachedInsets[3]);
if( NULL != env && NULL != javaWin ) {
- (*env)->CallVoidMethod(env, javaWin, insetsChangedID, JNI_FALSE, cachedInsets[0], cachedInsets[1], cachedInsets[2], cachedInsets[3]);
+ (*env)->CallVoidMethod(env, javaWin, insetsChangedID, cachedInsets[0], cachedInsets[1], cachedInsets[2], cachedInsets[3]);
}
}
diff --git a/src/newt/native/MacNewtNSWindow.m b/src/newt/native/MacNewtNSWindow.m
index 87cdb7b96..f93e1aa86 100644
--- a/src/newt/native/MacNewtNSWindow.m
+++ b/src/newt/native/MacNewtNSWindow.m
@@ -835,7 +835,7 @@ NS_ENDHANDLER
sizeChangedID = (*env)->GetMethodID(env, clazz, "sizeChanged", "(ZIIZ)V");
updatePixelScaleID = (*env)->GetMethodID(env, clazz, "updatePixelScale", "(ZFFFZ)V");
visibleChangedID = (*env)->GetMethodID(env, clazz, "visibleChanged", "(Z)V");
- insetsChangedID = (*env)->GetMethodID(env, clazz, "insetsChanged", "(ZIIII)V");
+ insetsChangedID = (*env)->GetMethodID(env, clazz, "insetsChanged", "(IIII)V");
sizeScreenPosInsetsChangedID = (*env)->GetMethodID(env, clazz, "sizeScreenPosInsetsChanged", "(ZIIIIIIIIZZ)V");
screenPositionChangedID = (*env)->GetMethodID(env, clazz, "screenPositionChanged", "(ZII)V");
focusChangedID = (*env)->GetMethodID(env, clazz, "focusChanged", "(ZZ)V");
@@ -968,7 +968,7 @@ NS_ENDHANDLER
DBG_PRINT( "updateInsets: [ l %d, r %d, t %d, b %d ]\n", cachedInsets[0], cachedInsets[1], cachedInsets[2], cachedInsets[3]);
if( NULL != env && NULL != javaWin ) {
- (*env)->CallVoidMethod(env, javaWin, insetsChangedID, JNI_FALSE, cachedInsets[0], cachedInsets[1], cachedInsets[2], cachedInsets[3]);
+ (*env)->CallVoidMethod(env, javaWin, insetsChangedID, cachedInsets[0], cachedInsets[1], cachedInsets[2], cachedInsets[3]);
}
}
diff --git a/src/newt/native/WindowsWindow.c b/src/newt/native/WindowsWindow.c
index 167adb848..1074dad6f 100644
--- a/src/newt/native/WindowsWindow.c
+++ b/src/newt/native/WindowsWindow.c
@@ -760,7 +760,7 @@ static void UpdateInsets(JNIEnv *env, WindowUserData *wud, HWND hwnd) {
(void*)hwnd, strategy, (int)wud->insets.left, (int)wud->insets.right, (int)wud->insets.top, (int)wud->insets.bottom,
(int) ( wud->insets.left + wud->insets.right ), (int) (wud->insets.top + wud->insets.bottom), wud->isInCreation);
if( !wud->isInCreation ) {
- (*env)->CallVoidMethod(env, window, insetsChangedID, JNI_FALSE,
+ (*env)->CallVoidMethod(env, window, insetsChangedID,
(int)wud->insets.left, (int)wud->insets.right, (int)wud->insets.top, (int)wud->insets.bottom);
}
}
@@ -2122,7 +2122,7 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_windows_WindowDriver_initIDs0
{
NewtCommon_init(env);
- insetsChangedID = (*env)->GetMethodID(env, clazz, "insetsChanged", "(ZIIII)V");
+ insetsChangedID = (*env)->GetMethodID(env, clazz, "insetsChanged", "(IIII)V");
sizeChangedID = (*env)->GetMethodID(env, clazz, "sizeChanged", "(ZIIZ)V");
maximizedChangedID = (*env)->GetMethodID(env, clazz, "maximizedChanged", "(ZZ)V");
positionChangedID = (*env)->GetMethodID(env, clazz, "positionChanged", "(ZII)V");
diff --git a/src/newt/native/X11Display.c b/src/newt/native/X11Display.c
index 09c3e2c4b..46ae996cc 100644
--- a/src/newt/native/X11Display.c
+++ b/src/newt/native/X11Display.c
@@ -253,12 +253,12 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_x11_DisplayDriver_initIDs0
sendRRScreenChangeNotifyID = (*env)->GetMethodID(env, clazz, "sendRRScreenChangeNotify", "(J)V");
getCurrentThreadNameID = (*env)->GetStaticMethodID(env, X11NewtWindowClazz, "getCurrentThreadName", "()Ljava/lang/String;");
dumpStackID = (*env)->GetStaticMethodID(env, X11NewtWindowClazz, "dumpStack", "()V");
- insetsChangedID = (*env)->GetMethodID(env, X11NewtWindowClazz, "insetsChanged", "(ZIIII)V");
+ insetsChangedID = (*env)->GetMethodID(env, X11NewtWindowClazz, "insetsChanged", "(IIII)V");
sizeChangedID = (*env)->GetMethodID(env, X11NewtWindowClazz, "sizeChanged", "(ZIIZ)V");
positionChangedID = (*env)->GetMethodID(env, X11NewtWindowClazz, "positionChanged", "(ZII)V");
focusVisibleChangedID = (*env)->GetMethodID(env, X11NewtWindowClazz, "focusVisibleChanged", "(ZII)V");
visibleChangedID = (*env)->GetMethodID(env, X11NewtWindowClazz, "visibleChanged", "(Z)V");
- insetsVisibleChangedID = (*env)->GetMethodID(env, X11NewtWindowClazz, "insetsVisibleChanged", "(ZIIIII)V");
+ insetsVisibleChangedID = (*env)->GetMethodID(env, X11NewtWindowClazz, "insetsVisibleChanged", "(IIIII)V");
sizePosMaxInsetsVisibleChangedID = (*env)->GetMethodID(env, X11NewtWindowClazz, "sizePosMaxInsetsVisibleChanged", "(ZIIIIIIIIIIIZ)V");
reparentNotifyID = (*env)->GetMethodID(env, X11NewtWindowClazz, "reparentNotify", "(J)V");
windowDestroyNotifyID = (*env)->GetMethodID(env, X11NewtWindowClazz, "windowDestroyNotify", "(Z)Z");
@@ -835,7 +835,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_DisplayDriver_DispatchMessage
// insets: negative values are ignored
int left=-1, right=-1, top=-1, bottom=-1;
if( NewtWindows_updateInsets(dpy, jw, &left, &right, &top, &bottom) ) {
- (*env)->CallVoidMethod(env, jw->jwindow, insetsVisibleChangedID, JNI_FALSE, left, right, top, bottom, 1);
+ (*env)->CallVoidMethod(env, jw->jwindow, insetsVisibleChangedID, left, right, top, bottom, 1);
} else {
(*env)->CallVoidMethod(env, jw->jwindow, visibleChangedID, JNI_TRUE);
}
diff --git a/src/newt/native/X11Window.c b/src/newt/native/X11Window.c
index 930d758a2..7ddc5d3d0 100644
--- a/src/newt/native/X11Window.c
+++ b/src/newt/native/X11Window.c
@@ -915,7 +915,7 @@ JNIEXPORT jlongArray JNICALL Java_jogamp_newt_driver_x11_WindowDriver_CreateWind
// send insets before visibility, allowing java code a proper sync point!
XSync(dpy, False);
if( NewtWindows_updateInsets(dpy, javaWindow, &left, &right, &top, &bottom) ) {
- (*env)->CallVoidMethod(env, javaWindow->jwindow, insetsVisibleChangedID, JNI_FALSE, left, right, top, bottom, 1);
+ (*env)->CallVoidMethod(env, javaWindow->jwindow, insetsVisibleChangedID, left, right, top, bottom, 1);
} else {
(*env)->CallVoidMethod(env, javaWindow->jwindow, visibleChangedID, JNI_TRUE);
left=0; right=0; top=0; bottom=0;