summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnders Lindgren <andlind@gmail.com>2015-11-15 18:46:04 +0100
committerAnders Lindgren <andlind@gmail.com>2015-11-15 18:51:50 +0100
commit63e6f4c820bb677bc915445c99041a51aef6bdab (patch)
tree283bdf69345fb66660a47a9a88ee49e8c4db0d8e
parent4f19767dfa527955b94c9133e8ce03cf1c766750 (diff)
downloademacs-63e6f4c820bb677bc915445c99041a51aef6bdab.tar.gz
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.
-rw-r--r--src/nsterm.h7
-rw-r--r--src/nsterm.m21
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 *);
- (void)windowDidMove: (id)sender;
#endif
- (int)fullscreenState;
+
+/* Non-notification versions of NSView methods. Used for direct calls. */
+- (void)windowWillEnterFullScreen;
+- (void)windowDidEnterFullScreen;
+- (void)windowWillExitFullScreen;
+- (void)windowDidExitFullScreen;
+- (void)windowDidBecomeKey;
@end
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)
- (void)windowDidBecomeKey: (NSNotification *)notification
/* cf. x_detect_focus_change(), x_focus_changed(), x_new_focus_frame() */
{
+ [self windowDidBecomeKey];
+}
+
+
+- (void)windowDidBecomeKey /* for direct calls */
+{
struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (emacsframe);
struct frame *old_focus = dpyinfo->x_focus_frame;
@@ -6866,10 +6872,6 @@ not_in_argv (NSString *arg)
}
#endif
-#if !defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
-#define NSWindowDidEnterFullScreenNotification "NSWindowDidEnterFullScreenNotification"
-#endif
-
- (void)windowWillEnterFullScreen:(NSNotification *)notification
{
[self windowWillEnterFullScreen];
@@ -6880,19 +6882,18 @@ not_in_argv (NSString *arg)
fs_before_fs = fs_state;
}
-- (void)windowDidEnterFullScreen /* provided for direct calls */
+- (void)windowDidEnterFullScreen:(NSNotification *)notification
{
- [self windowDidEnterFullScreen:
- [NSNotification notificationWithName:NSWindowDidEnterFullScreenNotification
- object:[self window]]];
+ [self windowDidEnterFullScreen];
}
-- (void)windowDidEnterFullScreen:(NSNotification *)notification
+
+- (void)windowDidEnterFullScreen /* provided for direct calls */
{
NSTRACE ("windowDidEnterFullScreen");
[self setFSValue: FULLSCREEN_BOTH];
if (! [self fsIsNative])
{
- [self windowDidBecomeKey:notification];
+ [self windowDidBecomeKey];
[nonfs_window orderOut:self];
}
else