From: David Reitter Date: Sun, 8 Nov 2015 01:43:29 +0000 (-0500) Subject: Provide NS notification objects where required to eliminate warnings X-Git-Tag: emacs-25.0.90~886 X-Git-Url: https://code.delx.au/gnu-emacs/commitdiff_plain/35cd51814507987b916c4b4e0a7b45e09e454341 Provide NS notification objects where required to eliminate warnings * nsterm.m (windowDidResize:, toggleFullScreen:): Call notification functions with notification objects as per delegate APIs. --- diff --git a/src/nsterm.m b/src/nsterm.m index 9a2249c57b..fabfa2914a 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -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]; } }