]> git.eshelyaron.com Git - emacs.git/commitdiff
Add ns-use-fullscreen-animation for non-native fullscreen on NS.
authorJan Djärv <jan.h.d@swipnet.se>
Sun, 5 Oct 2014 12:20:17 +0000 (14:20 +0200)
committerJan Djärv <jan.h.d@swipnet.se>
Sun, 5 Oct 2014 12:20:17 +0000 (14:20 +0200)
* nsterm.m (syms_of_nsterm): ns-use-fullscreen-animation is new.
(toggleFullScreen:): Use ns-use-fullscreen-animation for animate.

src/ChangeLog
src/nsterm.m

index 59d28aad8bc5c703aa738256c1f3d2c1c7ea9a90..fe0077b92b53e3238d72b8d9ad2ecd17d587c9bc 100644 (file)
@@ -1,5 +1,8 @@
 2014-10-05  Jan Djärv  <jan.h.d@swipnet.se>
 
+       * 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.
index d40541f512550c1d0548517e8d764d325056756e..6e25716b239f649b41f0e37b0f80a30224195fd8 100644 (file)
@@ -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.