emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master ea5a7f9 1/3: Remove old macOS compatibility code


From: Alan Third
Subject: [Emacs-diffs] master ea5a7f9 1/3: Remove old macOS compatibility code
Date: Tue, 14 Mar 2017 10:47:59 -0400 (EDT)

branch: master
commit ea5a7f990dc56ab92b04d668fcf72bb330bf2d78
Author: Alan Third <address@hidden>
Commit: Alan Third <address@hidden>

    Remove old macOS compatibility code
    
    * src/nsimage.m, src/nsmenu.m, src/nsterm.m: Remove code only for
    macOS versions below 10.6 as they are not supported in Emacs 25+.
---
 src/nsimage.m | 14 --------------
 src/nsmenu.m  |  5 -----
 src/nsterm.m  | 25 -------------------------
 3 files changed, 44 deletions(-)

diff --git a/src/nsimage.m b/src/nsimage.m
index 5136791..cc8abf7 100644
--- a/src/nsimage.m
+++ b/src/nsimage.m
@@ -179,13 +179,6 @@ ns_set_alpha (void *img, int x, int y, unsigned char a)
       return nil;
     }
 
-  /* The next two lines cause the DPI of the image to be ignored.
-     This seems to be the behavior users expect. */
-#ifdef NS_IMPL_COCOA
-#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
-  [image setScalesWhenResized: YES];
-#endif
-#endif
   [image setSize: NSMakeSize([imgRep pixelsWide], [imgRep pixelsHigh])];
 
   [image setName: [NSString stringWithUTF8String: SSDATA (file)]];
@@ -355,13 +348,6 @@ ns_set_alpha (void *img, int x, int y, unsigned char a)
           if ([bmr numberOfPlanes] >= 3)
               [bmr getBitmapDataPlanes: pixmapData];
 
-          /* The next two lines cause the DPI of the image to be ignored.
-             This seems to be the behavior users expect. */
-#ifdef NS_IMPL_COCOA
-#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
-          [self setScalesWhenResized: YES];
-#endif
-#endif
           [self setSize: NSMakeSize([bmr pixelsWide], [bmr pixelsHigh])];
 
           break;
diff --git a/src/nsmenu.m b/src/nsmenu.m
index 5c6442a..59ea385 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -1519,11 +1519,6 @@ ns_popup_dialog (struct frame *f, Lisp_Object header, 
Lisp_Object contents)
   area.size.width = ICONSIZE;
   area.size.height= ICONSIZE;
   img = [[NSImage imageNamed: @"NSApplicationIcon"] copy];
-#ifdef NS_IMPL_COCOA
-#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
-  [img setScalesWhenResized: YES];
-#endif
-#endif
   [img setSize: NSMakeSize (ICONSIZE, ICONSIZE)];
   imgView = [[NSImageView alloc] initWithFrame: area];
   [imgView setImage: img];
diff --git a/src/nsterm.m b/src/nsterm.m
index f985786..0543569 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -5936,31 +5936,6 @@ not_in_argv (NSString *arg)
 }
 
 
-#ifdef NS_IMPL_COCOA
-/* Needed to pick up Ctrl-tab and possibly other events that Mac OS X
-   decided not to send key-down for.
-   See http://osdir.com/ml/editors.vim.mac/2007-10/msg00141.html
-   This only applies on Tiger and earlier.
-   If it matches one of these, send it on to keyDown. */
--(void)keyUp: (NSEvent *)theEvent
-{
-  int flags = [theEvent modifierFlags];
-  int code = [theEvent keyCode];
-
-  NSTRACE ("[EmacsView keyUp:]");
-
-  if (floor (NSAppKitVersionNumber) <= 824 /*NSAppKitVersionNumber10_4*/ &&
-      code == 0x30 && (flags & NSEventModifierFlagControl) && !(flags & 
NSEventModifierFlagCommand))
-    {
-      if (NS_KEYLOG)
-        fprintf (stderr, "keyUp: passed test");
-      ns_fake_keydown = YES;
-      [self keyDown: theEvent];
-    }
-}
-#endif
-
-
 /* <NSTextInput> implementation (called through super interpretKeyEvents:]). */
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]