]> git.eshelyaron.com Git - emacs.git/commitdiff
* macfont.h (macfont_update_antialias_threshold): Declare.
authorJan Djärv <jan.h.d@swipnet.se>
Sun, 20 Jul 2014 13:18:47 +0000 (15:18 +0200)
committerJan Djärv <jan.h.d@swipnet.se>
Sun, 20 Jul 2014 13:18:47 +0000 (15:18 +0200)
* macfont.m (macfont_update_antialias_threshold): Remove static.

* nsterm.h (EmacsApp): Add antialiasThresholdDidChange.

* nsterm.m (applicationDidFinishLaunching:): Call
antialiasThresholdDidChange, register for antialias changes.
(antialiasThresholdDidChange:): New method for EmacsApp.

Fixes: debbugs:17534
src/ChangeLog
src/macfont.h
src/macfont.m
src/nsterm.h
src/nsterm.m

index 8dda7baa6a4425d9766b2e43e6ee6000f45ea32c..f39526f4f4b0d750dd5b0e9504f9f1bd3ca5665e 100644 (file)
@@ -1,3 +1,15 @@
+2014-07-20  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * nsterm.m (applicationDidFinishLaunching:): Call
+       antialiasThresholdDidChange, register for antialias changes (Bug#17534).
+       (antialiasThresholdDidChange:): New method for EmacsApp.
+
+       * nsterm.h (EmacsApp): Add antialiasThresholdDidChange.
+
+       * macfont.m (macfont_update_antialias_threshold): Remove static.
+
+       * macfont.h (macfont_update_antialias_threshold): Declare.
+
 2014-07-17  Eli Zaretskii  <eliz@gnu.org>
 
        * w32select.c (setup_windows_coding_system): Apply
index 8b451357e42c6e4b81ef97aa036d85be14d8eff2..7421cd63a797501db8f90cbb31dce46490c0ddc0 100644 (file)
@@ -144,4 +144,5 @@ typedef const struct _EmacsScreenFont *ScreenFontRef; /* opaque */
 
 extern void mac_register_font_driver (struct frame *f);
 extern void *macfont_get_nsctfont (struct font *font);
+extern void macfont_update_antialias_threshold (void);
 
index 075b512e68624cb96621c8311e945e8c6f974a11..1bb3fb141349b184045832225cf6f9920beb0d26 100644 (file)
@@ -729,7 +729,7 @@ static const struct
 
 static CGFloat macfont_antialias_threshold;
 
-static void
+void
 macfont_update_antialias_threshold (void)
 {
   int threshold;
index 74789634a90048d52d5579a401e6f13d9b51acee..8c3e4e5c3147ed595ad6b544ef70987196b1b3a0 100644 (file)
@@ -111,6 +111,7 @@ typedef float EmacsCGFloat;
 #endif
 }
 - (void)logNotification: (NSNotification *)notification;
+- (void)antialiasThresholdDidChange:(NSNotification *)notification;
 - (void)sendEvent: (NSEvent *)theEvent;
 - (void)showPreferencesWindow: (id)sender;
 - (BOOL) openFile: (NSString *)fileName;
index c7cb4faa3b787854d8931b8dfdca9bde545467ad..4b1ebb2b5169dfa44e9e9b2cd355014a08a52cbe 100644 (file)
@@ -4668,9 +4668,30 @@ ns_term_shutdown (int sig)
   ((EmacsApp *)self)->applicationDidFinishLaunchingCalled = YES;
 #endif
   [NSApp setServicesProvider: NSApp];
+
+  [self antialiasThresholdDidChange:nil];
+#ifdef NS_IMPL_COCOA
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+  [[NSNotificationCenter defaultCenter]
+    addObserver:self
+       selector:@selector(antialiasThresholdDidChange:)
+          name:NSAntialiasThresholdChangedNotification
+        object:nil];
+#endif
+#endif
+
   ns_send_appdefined (-2);
 }
 
+- (void)antialiasThresholdDidChange:(NSNotification *)notification
+{
+#ifdef NS_IMPL_COCOA
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+  macfont_update_antialias_threshold ();
+#endif
+#endif
+}
+
 
 /* Termination sequences:
     C-x C-c: