From: Jan Djärv Date: Sun, 5 Oct 2014 12:20:17 +0000 (+0200) Subject: Add ns-use-fullscreen-animation for non-native fullscreen on NS. X-Git-Tag: emacs-25.0.90~2635^2~679^2~122 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=73267792f042b6b3e0cf00914f2f98e2e92c181c;p=emacs.git Add ns-use-fullscreen-animation for non-native fullscreen on NS. * nsterm.m (syms_of_nsterm): ns-use-fullscreen-animation is new. (toggleFullScreen:): Use ns-use-fullscreen-animation for animate. --- diff --git a/src/ChangeLog b/src/ChangeLog index 59d28aad8bc..fe0077b92b5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2014-10-05 Jan Djärv + * nsterm.m (syms_of_nsterm): ns-use-fullscreen-animation is new. + (toggleFullScreen:): Use ns-use-fullscreen-animation for animate. + * macfont.m: Fix indentation and import changes from macport 24.3.94. (macfont_closest_traits_index): New function. diff --git a/src/nsterm.m b/src/nsterm.m index d40541f5125..6e25716b239 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -6529,7 +6529,7 @@ if (cols > 0 && rows > 0) [fw makeFirstResponder:self]; [w orderOut:self]; r = [fw frameRectForContentRect:[screen frame]]; - [fw setFrame: r display:YES animate:YES]; + [fw setFrame: r display:YES animate:ns_use_fullscreen_animation]; [self windowDidEnterFullScreen:nil]; [fw display]; } @@ -6561,7 +6561,7 @@ if (cols > 0 && rows > 0) FRAME_TOOLBAR_HEIGHT (f) = tobar_height; [self windowWillExitFullScreen:nil]; - [fw setFrame: [w frame] display:YES animate:YES]; + [fw setFrame: [w frame] display:YES animate:ns_use_fullscreen_animation]; [fw close]; [w makeKeyAndOrderFront:NSApp]; [self windowDidExitFullScreen:nil]; @@ -7765,6 +7765,12 @@ Default is t for OSX >= 10.7, nil otherwise. */); #endif ns_last_use_native_fullscreen = ns_use_native_fullscreen; + DEFVAR_BOOL ("ns-use-fullscreen-animation", ns_use_fullscreen_animation, + doc: /*Non-nil means use animation on non-native fullscreen. +For native fullscreen, this does nothing. +Default is nil. */); + ns_use_fullscreen_animation = NO; + DEFVAR_BOOL ("ns-use-srgb-colorspace", ns_use_srgb_colorspace, doc: /*Non-nil means to use sRGB colorspace on OSX >= 10.7. Note that this does not apply to images.