diff options
| author | David Reitter | 2015-11-07 20:43:29 -0500 |
|---|---|---|
| committer | David Reitter | 2015-11-07 20:46:58 -0500 |
| commit | 35cd51814507987b916c4b4e0a7b45e09e454341 (patch) | |
| tree | a4eca29f8e660ded811707acb2415cd1c2bc36cc /src | |
| parent | ea88d874a4f3ecbfdb5fa79dcb3ea90927cebec2 (diff) | |
| download | emacs-35cd51814507987b916c4b4e0a7b45e09e454341.tar.gz emacs-35cd51814507987b916c4b4e0a7b45e09e454341.zip | |
Provide NS notification objects where required to eliminate warnings
* nsterm.m (windowDidResize:, toggleFullScreen:):
Call notification functions with notification objects
as per delegate APIs.
Diffstat (limited to 'src')
| -rw-r--r-- | src/nsterm.m | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/nsterm.m b/src/nsterm.m index 9a2249c57bb..fabfa2914a0 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -6267,7 +6267,10 @@ not_in_argv (NSString *arg) | |||
| 6267 | wr = NSMakeRect (0, 0, neww, newh); | 6267 | wr = NSMakeRect (0, 0, neww, newh); |
| 6268 | NSTRACE_RECT ("setFrame", wr); | 6268 | NSTRACE_RECT ("setFrame", wr); |
| 6269 | [view setFrame: wr]; | 6269 | [view setFrame: wr]; |
| 6270 | [self windowDidMove:nil]; // Update top/left. | 6270 | // to do: consider using [NSNotificationCenter postNotificationName:]. |
| 6271 | [self windowDidMove: // Update top/left. | ||
| 6272 | [NSNotification notificationWithName:NSWindowDidMoveNotification | ||
| 6273 | object:[view window]]]; | ||
| 6271 | } | 6274 | } |
| 6272 | else | 6275 | else |
| 6273 | { | 6276 | { |
| @@ -7051,13 +7054,17 @@ not_in_argv (NSString *arg) | |||
| 7051 | 7054 | ||
| 7052 | nonfs_window = w; | 7055 | nonfs_window = w; |
| 7053 | 7056 | ||
| 7054 | [self windowWillEnterFullScreen:nil]; | 7057 | [self windowWillEnterFullScreen: |
| 7058 | [NSNotification notificationWithName:NSWindowWillEnterFullScreenNotification | ||
| 7059 | object:[self window]]]; | ||
| 7055 | [fw makeKeyAndOrderFront:NSApp]; | 7060 | [fw makeKeyAndOrderFront:NSApp]; |
| 7056 | [fw makeFirstResponder:self]; | 7061 | [fw makeFirstResponder:self]; |
| 7057 | [w orderOut:self]; | 7062 | [w orderOut:self]; |
| 7058 | r = [fw frameRectForContentRect:[screen frame]]; | 7063 | r = [fw frameRectForContentRect:[screen frame]]; |
| 7059 | [fw setFrame: r display:YES animate:ns_use_fullscreen_animation]; | 7064 | [fw setFrame: r display:YES animate:ns_use_fullscreen_animation]; |
| 7060 | [self windowDidEnterFullScreen:nil]; | 7065 | [self windowDidEnterFullScreen: |
| 7066 | [NSNotification notificationWithName:NSWindowDidEnterFullScreenNotification | ||
| 7067 | object:[self window]]]; | ||
| 7061 | [fw display]; | 7068 | [fw display]; |
| 7062 | } | 7069 | } |
| 7063 | else | 7070 | else |
| @@ -7085,11 +7092,17 @@ not_in_argv (NSString *arg) | |||
| 7085 | if (FRAME_EXTERNAL_TOOL_BAR (f)) | 7092 | if (FRAME_EXTERNAL_TOOL_BAR (f)) |
| 7086 | FRAME_TOOLBAR_HEIGHT (f) = tobar_height; | 7093 | FRAME_TOOLBAR_HEIGHT (f) = tobar_height; |
| 7087 | 7094 | ||
| 7088 | [self windowWillExitFullScreen:nil]; | 7095 | // to do: consider using [NSNotificationCenter postNotificationName:] to send notifications. |
| 7096 | |||
| 7097 | [self windowWillExitFullScreen: | ||
| 7098 | [NSNotification notificationWithName:NSWindowWillExitFullScreenNotification | ||
| 7099 | object:[self window]]]; | ||
| 7089 | [fw setFrame: [w frame] display:YES animate:ns_use_fullscreen_animation]; | 7100 | [fw setFrame: [w frame] display:YES animate:ns_use_fullscreen_animation]; |
| 7090 | [fw close]; | 7101 | [fw close]; |
| 7091 | [w makeKeyAndOrderFront:NSApp]; | 7102 | [w makeKeyAndOrderFront:NSApp]; |
| 7092 | [self windowDidExitFullScreen:nil]; | 7103 | [self windowDidExitFullScreen: |
| 7104 | [NSNotification notificationWithName:NSWindowDidExitFullScreenNotification | ||
| 7105 | object:[self window]]]; | ||
| 7093 | [self updateFrameSize:YES]; | 7106 | [self updateFrameSize:YES]; |
| 7094 | } | 7107 | } |
| 7095 | } | 7108 | } |