aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/native/MacWindow.m
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-09-25 09:43:21 +0200
committerSven Gothel <[email protected]>2015-09-25 09:43:21 +0200
commitd3185d3c79f04012e604039f84466479bab755f9 (patch)
tree81938b1234e45a008550802935b16afa1d2e94ab /src/newt/native/MacWindow.m
parentb4e4cad809c1b03b6be9a703a403d28c00249e5e (diff)
Bug 1214 - NEWT MacOSX: Detect auto-resize of Window when it is larger than screen
- On OSX (similar to X11) a created window with size > screen will get resized to fit screen size implicitly. - Fix detects insets, position and size after onscreen window creation. - Patch also merges insets and size change java callback
Diffstat (limited to 'src/newt/native/MacWindow.m')
-rw-r--r--src/newt/native/MacWindow.m20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/newt/native/MacWindow.m b/src/newt/native/MacWindow.m
index b59e19e4e..a0164c330 100644
--- a/src/newt/native/MacWindow.m
+++ b/src/newt/native/MacWindow.m
@@ -1374,6 +1374,26 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_WindowDriver_changeContent
/*
* Class: jogamp_newt_driver_macosx_WindowDriver
+ * Method: updateSizePosInsets0
+ * Signature: (JZ)V
+ */
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_WindowDriver_updateSizePosInsets0
+ (JNIEnv *env, jobject jthis, jlong window, jboolean defer)
+{
+ NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+ NewtMacWindow* mWin = (NewtMacWindow*) ((intptr_t) window);
+
+ DBG_PRINT( "updateSizePosInsets - window: %p, defer %d (START)\n", mWin, (int)defer);
+
+ [mWin updateSizePosInsets: env jwin:jthis defer:defer];
+
+ DBG_PRINT( "setWindowClientTopLeftPointAndSize - window: %p, defer %d (END)\n", mWin, (int)defer);
+
+ [pool release];
+}
+
+/*
+ * Class: jogamp_newt_driver_macosx_WindowDriver
* Method: setWindowClientTopLeftPointAndSize0
* Signature: (JIIIIZ)V
*/