diff options
| author | Anders Lindgren | 2015-11-15 18:46:04 +0100 |
|---|---|---|
| committer | Anders Lindgren | 2015-11-15 18:51:50 +0100 |
| commit | 63e6f4c820bb677bc915445c99041a51aef6bdab (patch) | |
| tree | 283bdf69345fb66660a47a9a88ee49e8c4db0d8e /src | |
| parent | 4f19767dfa527955b94c9133e8ce03cf1c766750 (diff) | |
| download | emacs-63e6f4c820bb677bc915445c99041a51aef6bdab.tar.gz emacs-63e6f4c820bb677bc915445c99041a51aef6bdab.zip | |
Fixed OS X 10.6.8 build issue (bug#21862).
* src/nsterm.h (EmacsView): Add missing declarations.
* src/nsterm.m ([EmacsView windowDidBecomeKey]): New method, like
the standard method but without the notification parameter.
Intended to be used for direct calls.
([EmacsView windowDidEnterFullScreen]): Call the non-notification
version of `windowDidBecomeKey'. Made the notification method call
the non-notification method instead of the vice versa.
(NSWindowDidEnterFullScreenNotification): Deleted, no longer
needed.
Diffstat (limited to 'src')
| -rw-r--r-- | src/nsterm.h | 7 | ||||
| -rw-r--r-- | src/nsterm.m | 21 |
2 files changed, 18 insertions, 10 deletions
diff --git a/src/nsterm.h b/src/nsterm.h index 1b330f08636..7828af73f68 100644 --- a/src/nsterm.h +++ b/src/nsterm.h | |||
| @@ -412,6 +412,13 @@ void nstrace_leave(int *); | |||
| 412 | - (void)windowDidMove: (id)sender; | 412 | - (void)windowDidMove: (id)sender; |
| 413 | #endif | 413 | #endif |
| 414 | - (int)fullscreenState; | 414 | - (int)fullscreenState; |
| 415 | |||
| 416 | /* Non-notification versions of NSView methods. Used for direct calls. */ | ||
| 417 | - (void)windowWillEnterFullScreen; | ||
| 418 | - (void)windowDidEnterFullScreen; | ||
| 419 | - (void)windowWillExitFullScreen; | ||
| 420 | - (void)windowDidExitFullScreen; | ||
| 421 | - (void)windowDidBecomeKey; | ||
| 415 | @end | 422 | @end |
| 416 | 423 | ||
| 417 | 424 | ||
diff --git a/src/nsterm.m b/src/nsterm.m index 5c39d5c0e4d..397ade12f02 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -6440,6 +6440,12 @@ not_in_argv (NSString *arg) | |||
| 6440 | - (void)windowDidBecomeKey: (NSNotification *)notification | 6440 | - (void)windowDidBecomeKey: (NSNotification *)notification |
| 6441 | /* cf. x_detect_focus_change(), x_focus_changed(), x_new_focus_frame() */ | 6441 | /* cf. x_detect_focus_change(), x_focus_changed(), x_new_focus_frame() */ |
| 6442 | { | 6442 | { |
| 6443 | [self windowDidBecomeKey]; | ||
| 6444 | } | ||
| 6445 | |||
| 6446 | |||
| 6447 | - (void)windowDidBecomeKey /* for direct calls */ | ||
| 6448 | { | ||
| 6443 | struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (emacsframe); | 6449 | struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (emacsframe); |
| 6444 | struct frame *old_focus = dpyinfo->x_focus_frame; | 6450 | struct frame *old_focus = dpyinfo->x_focus_frame; |
| 6445 | 6451 | ||
| @@ -6866,10 +6872,6 @@ not_in_argv (NSString *arg) | |||
| 6866 | } | 6872 | } |
| 6867 | #endif | 6873 | #endif |
| 6868 | 6874 | ||
| 6869 | #if !defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 | ||
| 6870 | #define NSWindowDidEnterFullScreenNotification "NSWindowDidEnterFullScreenNotification" | ||
| 6871 | #endif | ||
| 6872 | |||
| 6873 | - (void)windowWillEnterFullScreen:(NSNotification *)notification | 6875 | - (void)windowWillEnterFullScreen:(NSNotification *)notification |
| 6874 | { | 6876 | { |
| 6875 | [self windowWillEnterFullScreen]; | 6877 | [self windowWillEnterFullScreen]; |
| @@ -6880,19 +6882,18 @@ not_in_argv (NSString *arg) | |||
| 6880 | fs_before_fs = fs_state; | 6882 | fs_before_fs = fs_state; |
| 6881 | } | 6883 | } |
| 6882 | 6884 | ||
| 6883 | - (void)windowDidEnterFullScreen /* provided for direct calls */ | 6885 | - (void)windowDidEnterFullScreen:(NSNotification *)notification |
| 6884 | { | 6886 | { |
| 6885 | [self windowDidEnterFullScreen: | 6887 | [self windowDidEnterFullScreen]; |
| 6886 | [NSNotification notificationWithName:NSWindowDidEnterFullScreenNotification | ||
| 6887 | object:[self window]]]; | ||
| 6888 | } | 6888 | } |
| 6889 | - (void)windowDidEnterFullScreen:(NSNotification *)notification | 6889 | |
| 6890 | - (void)windowDidEnterFullScreen /* provided for direct calls */ | ||
| 6890 | { | 6891 | { |
| 6891 | NSTRACE ("windowDidEnterFullScreen"); | 6892 | NSTRACE ("windowDidEnterFullScreen"); |
| 6892 | [self setFSValue: FULLSCREEN_BOTH]; | 6893 | [self setFSValue: FULLSCREEN_BOTH]; |
| 6893 | if (! [self fsIsNative]) | 6894 | if (! [self fsIsNative]) |
| 6894 | { | 6895 | { |
| 6895 | [self windowDidBecomeKey:notification]; | 6896 | [self windowDidBecomeKey]; |
| 6896 | [nonfs_window orderOut:self]; | 6897 | [nonfs_window orderOut:self]; |
| 6897 | } | 6898 | } |
| 6898 | else | 6899 | else |