]> code.delx.au - gnu-emacs/commitdiff
Fixed OS X 10.6.8 build issue (bug#21862).
authorAnders Lindgren <andlind@gmail.com>
Sun, 15 Nov 2015 17:46:04 +0000 (18:46 +0100)
committerAnders Lindgren <andlind@gmail.com>
Sun, 15 Nov 2015 17:51:50 +0000 (18:51 +0100)
* 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.

src/nsterm.h
src/nsterm.m

index 1b330f086366f93bf54ed369410a9e8f440c008b..7828af73f68a4340d8f355f8618b7a8781fcc027 100644 (file)
@@ -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
 
 
index 5c39d5c0e4d1bf1d156705309edfd740ce82415d..397ade12f0253d1c7a84554398ec9ab180aef720 100644 (file)
@@ -6439,6 +6439,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