--- old/modules/javafx.graphics/src/main/native-glass/mac/GlassViewDelegate.h 2016-11-11 14:36:04.000000000 +0300 +++ new/modules/javafx.graphics/src/main/native-glass/mac/GlassViewDelegate.h 2016-11-11 14:36:04.000000000 +0300 @@ -74,6 +74,8 @@ - (void)updateTrackingAreas; - (void)drawRect:(NSRect)dirtyRect; +- (void)setResizableForFullscreen:(BOOL)resizable; + - (void)sendJavaMouseEvent:(NSEvent *)theEvent; - (void)resetMouseTracking; - (void)sendJavaMenuEvent:(NSEvent *)theEvent; --- old/modules/javafx.graphics/src/main/native-glass/mac/GlassViewDelegate.m 2016-11-11 14:36:04.000000000 +0300 +++ new/modules/javafx.graphics/src/main/native-glass/mac/GlassViewDelegate.m 2016-11-11 14:36:04.000000000 +0300 @@ -1044,6 +1044,21 @@ GLASS_CHECK_EXCEPTION(env); } +- (void)setResizableForFullscreen:(BOOL)resizable +{ + NSWindow* window = [self->nsView window]; + if ([window isKindOfClass:[GlassEmbeddedWindow class]] == NO + && !((GlassWindow*) window)->isResizable) { + NSUInteger mask = [window styleMask]; + if (resizable) { + mask |= NSResizableWindowMask; + } else { + mask &= ~(NSUInteger)NSResizableWindowMask; + } + [window setStyleMask: mask]; + } +} + /* The hierarchy for our view is view -> superview (host) -> window --- old/modules/javafx.graphics/src/main/native-glass/mac/GlassWindow+Overrides.m 2016-11-11 14:36:05.000000000 +0300 +++ new/modules/javafx.graphics/src/main/native-glass/mac/GlassWindow+Overrides.m 2016-11-11 14:36:05.000000000 +0300 @@ -195,6 +195,7 @@ - (void)windowWillEnterFullScreen:(NSNotification *)notification { //NSLog(@"windowWillEnterFullScreen"); + [[self->view delegate] setResizableForFullscreen:YES]; } - (void)windowDidEnterFullScreen:(NSNotification *)notification @@ -208,10 +209,15 @@ { //NSLog(@"windowWillExitFullScreen"); } + - (void)windowDidExitFullScreen:(NSNotification *)notification { //NSLog(@"windowDidExitFullScreen"); - [(GlassViewDelegate*)[self->view delegate] sendJavaFullScreenEvent:NO withNativeWidget:YES]; + + GlassViewDelegate* delegate = (GlassViewDelegate*)[self->view delegate]; + [delegate setResizableForFullscreen:NO]; + + [delegate sendJavaFullScreenEvent:NO withNativeWidget:YES]; [GlassApplication leaveFullScreenExitingLoopIfNeeded]; } --- old/modules/javafx.graphics/src/main/native-glass/mac/GlassWindow.m 2016-11-11 14:36:06.000000000 +0300 +++ new/modules/javafx.graphics/src/main/native-glass/mac/GlassWindow.m 2016-11-11 14:36:06.000000000 +0300 @@ -514,9 +514,9 @@ /* 10.7 full screen window support */ if ([NSWindow instancesRespondToSelector:@selector(toggleFullScreen:)]) { NSWindowCollectionBehavior behavior = [window->nsWindow collectionBehavior]; - if (window->isDecorated && !window->owner) + if ((jStyleMask&com_sun_glass_ui_Window_POPUP) == 0 && !window->owner) { - // Only titled ownerless windows should have the Full Screen Toggle control + // Only ownerless windows should have the Full Screen Toggle control behavior |= (1 << 7) /* NSWindowCollectionBehaviorFullScreenPrimary */; } else