* 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
+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
extern void mac_register_font_driver (struct frame *f);
extern void *macfont_get_nsctfont (struct font *font);
+extern void macfont_update_antialias_threshold (void);
static CGFloat macfont_antialias_threshold;
-static void
+void
macfont_update_antialias_threshold (void)
{
int threshold;
#endif
}
- (void)logNotification: (NSNotification *)notification;
+- (void)antialiasThresholdDidChange:(NSNotification *)notification;
- (void)sendEvent: (NSEvent *)theEvent;
- (void)showPreferencesWindow: (id)sender;
- (BOOL) openFile: (NSString *)fileName;
((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: