Provide NS notification objects where required to eliminate warnings
* nsterm.m (windowDidResize:, toggleFullScreen:): Call notification functions with notification objects as per delegate APIs.
This commit is contained in:
parent
ea88d874a4
commit
35cd518145
1 changed files with 18 additions and 5 deletions
23
src/nsterm.m
23
src/nsterm.m
|
@ -6267,7 +6267,10 @@ - (void) updateFrameSize: (BOOL) delay;
|
|||
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 @@ - (void)toggleFullScreen: (id)sender
|
|||
|
||||
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 @@ - (void)toggleFullScreen: (id)sender
|
|||
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];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue