fullscreen also. So skip handleFS as this will print an error. */
if ([view fsIsNative] && [view isFullscreen])
{
- // maybe it is not necessary to wait
- [view waitFullScreenTransition];
return;
}
#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
// child frame must not be in fullscreen
if ([view fsIsNative] && [view isFullscreen])
- {
- // in case child is going fullscreen
- [view waitFullScreenTransition];
- [view toggleFullScreen:child];
- }
+ [view toggleFullScreen:child];
NSTRACE ("child setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary");
[child setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary];
#endif
#endif
fs_is_native = ns_use_native_fullscreen;
#endif
- in_fullscreen_transition = NO;
maximized_width = maximized_height = -1;
nonfs_window = nil;
- (void)windowWillEnterFullScreen:(NSNotification *)notification
{
NSTRACE ("[EmacsView windowWillEnterFullScreen:]");
- in_fullscreen_transition = YES;
[self windowWillEnterFullScreen];
}
- (void)windowWillEnterFullScreen /* provided for direct calls */
{
NSTRACE ("[EmacsView windowDidEnterFullScreen:]");
[self windowDidEnterFullScreen];
- in_fullscreen_transition = NO;
}
- (void)windowDidEnterFullScreen /* provided for direct calls */
- (void)windowWillExitFullScreen:(NSNotification *)notification
{
NSTRACE ("[EmacsView windowWillExitFullScreen:]");
- in_fullscreen_transition = YES;
[self windowWillExitFullScreen];
}
{
NSTRACE ("[EmacsView windowDidExitFullScreen:]");
[self windowDidExitFullScreen];
- in_fullscreen_transition = NO;
}
- (void)windowDidExitFullScreen /* provided for direct calls */
[[self window] performZoom:self];
}
-- (BOOL)inFullScreenTransition
-{
- return in_fullscreen_transition;
-}
-
-- (void)waitFullScreenTransition
-{
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
- while ([self inFullScreenTransition])
- {
- NSTRACE ("wait for fullscreen");
- wait_reading_process_output (0, 300000000, 0, 1, Qnil, NULL, 0);
- }
-#endif
-}
-
- (BOOL)fsIsNative
{
return fs_is_native;
#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
if ([[self window] respondsToSelector: @selector(toggleFullScreen:)])
- {
-#endif
- [[self window] toggleFullScreen:sender];
- // wait for fullscreen animation complete (bug#28496)
- [self waitFullScreenTransition];
-#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
- }
#endif
+ [[self window] toggleFullScreen:sender];
#endif
return;
}