]> code.delx.au - gnu-emacs/commitdiff
Provide NS notification objects where required to eliminate warnings
authorDavid Reitter <david.reitter@gmail.com>
Sun, 8 Nov 2015 01:43:29 +0000 (20:43 -0500)
committerDavid Reitter <david.reitter@gmail.com>
Sun, 8 Nov 2015 01:46:58 +0000 (20:46 -0500)
* nsterm.m (windowDidResize:, toggleFullScreen:):
Call notification functions with notification objects
as per delegate APIs.

src/nsterm.m

index 9a2249c57bb7aff8a46c39dec9e6c1dcc8ca8ba6..fabfa2914a0b868fd417173bd0201c09a02c287f 100644 (file)
@@ -6267,7 +6267,10 @@ not_in_argv (NSString *arg)
       wr = NSMakeRect (0, 0, neww, newh);
       NSTRACE_RECT ("setFrame", wr);
       [view setFrame: wr];
-      [self windowDidMove:nil];   // Update top/left.
+      // to do: consider using [NSNotificationCenter postNotificationName:].
+      [self windowDidMove: // Update top/left.
+             [NSNotification notificationWithName:NSWindowDidMoveNotification
+                                           object:[view window]]];
     }
   else
     {
@@ -7051,13 +7054,17 @@ not_in_argv (NSString *arg)
 
       nonfs_window = w;
 
-      [self windowWillEnterFullScreen:nil];
+      [self windowWillEnterFullScreen:
+             [NSNotification notificationWithName:NSWindowWillEnterFullScreenNotification
+                                           object:[self window]]];
       [fw makeKeyAndOrderFront:NSApp];
       [fw makeFirstResponder:self];
       [w orderOut:self];
       r = [fw frameRectForContentRect:[screen frame]];
       [fw setFrame: r display:YES animate:ns_use_fullscreen_animation];
-      [self windowDidEnterFullScreen:nil];
+      [self windowDidEnterFullScreen:
+             [NSNotification notificationWithName:NSWindowDidEnterFullScreenNotification
+                                           object:[self window]]];
       [fw display];
     }
   else
@@ -7085,11 +7092,17 @@ not_in_argv (NSString *arg)
       if (FRAME_EXTERNAL_TOOL_BAR (f))
         FRAME_TOOLBAR_HEIGHT (f) = tobar_height;
 
-      [self windowWillExitFullScreen:nil];
+      // to do: consider using [NSNotificationCenter postNotificationName:] to send notifications.
+
+      [self windowWillExitFullScreen:
+             [NSNotification notificationWithName:NSWindowWillExitFullScreenNotification
+                                           object:[self window]]];
       [fw setFrame: [w frame] display:YES animate:ns_use_fullscreen_animation];
       [fw close];
       [w makeKeyAndOrderFront:NSApp];
-      [self windowDidExitFullScreen:nil];
+      [self windowDidExitFullScreen:
+             [NSNotification notificationWithName:NSWindowDidExitFullScreenNotification
+                                           object:[self window]]];
       [self updateFrameSize:YES];
     }
 }