diff options
| author | Jan Djärv | 2014-07-20 15:18:47 +0200 |
|---|---|---|
| committer | Jan Djärv | 2014-07-20 15:18:47 +0200 |
| commit | 880b716696b4d8737e7199d6487f17b7e6825dd4 (patch) | |
| tree | 92dac1478861aa683ce4a90308e5f6bb05849d09 | |
| parent | eb8cb39e8930b476e20bb8434e28a350e46ece34 (diff) | |
| download | emacs-880b716696b4d8737e7199d6487f17b7e6825dd4.tar.gz emacs-880b716696b4d8737e7199d6487f17b7e6825dd4.zip | |
* macfont.h (macfont_update_antialias_threshold): Declare.
* 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
| -rw-r--r-- | src/ChangeLog | 12 | ||||
| -rw-r--r-- | src/macfont.h | 1 | ||||
| -rw-r--r-- | src/macfont.m | 2 | ||||
| -rw-r--r-- | src/nsterm.h | 1 | ||||
| -rw-r--r-- | src/nsterm.m | 21 |
5 files changed, 36 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 8dda7baa6a4..f39526f4f4b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2014-07-20 Jan Djärv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * nsterm.m (applicationDidFinishLaunching:): Call | ||
| 4 | antialiasThresholdDidChange, register for antialias changes (Bug#17534). | ||
| 5 | (antialiasThresholdDidChange:): New method for EmacsApp. | ||
| 6 | |||
| 7 | * nsterm.h (EmacsApp): Add antialiasThresholdDidChange. | ||
| 8 | |||
| 9 | * macfont.m (macfont_update_antialias_threshold): Remove static. | ||
| 10 | |||
| 11 | * macfont.h (macfont_update_antialias_threshold): Declare. | ||
| 12 | |||
| 1 | 2014-07-17 Eli Zaretskii <eliz@gnu.org> | 13 | 2014-07-17 Eli Zaretskii <eliz@gnu.org> |
| 2 | 14 | ||
| 3 | * w32select.c (setup_windows_coding_system): Apply | 15 | * w32select.c (setup_windows_coding_system): Apply |
diff --git a/src/macfont.h b/src/macfont.h index 8b451357e42..7421cd63a79 100644 --- a/src/macfont.h +++ b/src/macfont.h | |||
| @@ -144,4 +144,5 @@ typedef const struct _EmacsScreenFont *ScreenFontRef; /* opaque */ | |||
| 144 | 144 | ||
| 145 | extern void mac_register_font_driver (struct frame *f); | 145 | extern void mac_register_font_driver (struct frame *f); |
| 146 | extern void *macfont_get_nsctfont (struct font *font); | 146 | extern void *macfont_get_nsctfont (struct font *font); |
| 147 | extern void macfont_update_antialias_threshold (void); | ||
| 147 | 148 | ||
diff --git a/src/macfont.m b/src/macfont.m index 075b512e686..1bb3fb14134 100644 --- a/src/macfont.m +++ b/src/macfont.m | |||
| @@ -729,7 +729,7 @@ static const struct | |||
| 729 | 729 | ||
| 730 | static CGFloat macfont_antialias_threshold; | 730 | static CGFloat macfont_antialias_threshold; |
| 731 | 731 | ||
| 732 | static void | 732 | void |
| 733 | macfont_update_antialias_threshold (void) | 733 | macfont_update_antialias_threshold (void) |
| 734 | { | 734 | { |
| 735 | int threshold; | 735 | int threshold; |
diff --git a/src/nsterm.h b/src/nsterm.h index 74789634a90..8c3e4e5c314 100644 --- a/src/nsterm.h +++ b/src/nsterm.h | |||
| @@ -111,6 +111,7 @@ typedef float EmacsCGFloat; | |||
| 111 | #endif | 111 | #endif |
| 112 | } | 112 | } |
| 113 | - (void)logNotification: (NSNotification *)notification; | 113 | - (void)logNotification: (NSNotification *)notification; |
| 114 | - (void)antialiasThresholdDidChange:(NSNotification *)notification; | ||
| 114 | - (void)sendEvent: (NSEvent *)theEvent; | 115 | - (void)sendEvent: (NSEvent *)theEvent; |
| 115 | - (void)showPreferencesWindow: (id)sender; | 116 | - (void)showPreferencesWindow: (id)sender; |
| 116 | - (BOOL) openFile: (NSString *)fileName; | 117 | - (BOOL) openFile: (NSString *)fileName; |
diff --git a/src/nsterm.m b/src/nsterm.m index c7cb4faa3b7..4b1ebb2b516 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -4668,9 +4668,30 @@ ns_term_shutdown (int sig) | |||
| 4668 | ((EmacsApp *)self)->applicationDidFinishLaunchingCalled = YES; | 4668 | ((EmacsApp *)self)->applicationDidFinishLaunchingCalled = YES; |
| 4669 | #endif | 4669 | #endif |
| 4670 | [NSApp setServicesProvider: NSApp]; | 4670 | [NSApp setServicesProvider: NSApp]; |
| 4671 | |||
| 4672 | [self antialiasThresholdDidChange:nil]; | ||
| 4673 | #ifdef NS_IMPL_COCOA | ||
| 4674 | #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 | ||
| 4675 | [[NSNotificationCenter defaultCenter] | ||
| 4676 | addObserver:self | ||
| 4677 | selector:@selector(antialiasThresholdDidChange:) | ||
| 4678 | name:NSAntialiasThresholdChangedNotification | ||
| 4679 | object:nil]; | ||
| 4680 | #endif | ||
| 4681 | #endif | ||
| 4682 | |||
| 4671 | ns_send_appdefined (-2); | 4683 | ns_send_appdefined (-2); |
| 4672 | } | 4684 | } |
| 4673 | 4685 | ||
| 4686 | - (void)antialiasThresholdDidChange:(NSNotification *)notification | ||
| 4687 | { | ||
| 4688 | #ifdef NS_IMPL_COCOA | ||
| 4689 | #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 | ||
| 4690 | macfont_update_antialias_threshold (); | ||
| 4691 | #endif | ||
| 4692 | #endif | ||
| 4693 | } | ||
| 4694 | |||
| 4674 | 4695 | ||
| 4675 | /* Termination sequences: | 4696 | /* Termination sequences: |
| 4676 | C-x C-c: | 4697 | C-x C-c: |