< prev index next >

modules/graphics/src/main/native-glass/mac/GlassWindow+Java.m

Print this page

        

@@ -73,21 +73,27 @@
     if (self->suppressWindowMoveEvent == NO)
     {
         self->lastReportedLocation = frame.origin;
 
         GET_MAIN_JENV;
-        (*env)->CallVoidMethod(env, jWindow, jWindowNotifyMove, (int)frame.origin.x,  (int)frame.origin.y);
+
+        (*env)->CallVoidMethod(env, jWindow, jWindowNotifyMove, 
+            (int)frame.origin.x,  (int)frame.origin.y, [self->nsWindow isZoomed]);
         [self _sendJavaWindowMoveToAnotherScreenEventIfNeeded];
     }
 }
 
 - (void)_sendJavaWindowResizeEvent:(int)type forFrame:(NSRect)frame
 {
     if (self->suppressWindowResizeEvent == NO)
     {
         GET_MAIN_JENV;
-        (*env)->CallVoidMethod(env, jWindow, jWindowNotifyResize, type, (int)frame.size.width, (int)frame.size.height);
+        (*env)->CallVoidMethod(env, jWindow, jWindowNotifyResize, 
+            [self->nsWindow isZoomed] 
+                ? com_sun_glass_events_WindowEvent_MAXIMIZE 
+                : type,
+             (int)frame.size.width, (int)frame.size.height);
         [self _sendJavaWindowMoveToAnotherScreenEventIfNeeded];
     }
 }
 
 #pragma mark --- Additions
< prev index next >