Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 27 additions & 3 deletions src/MacVim/MMWindowController.m
Original file line number Diff line number Diff line change
Expand Up @@ -1021,13 +1021,19 @@ - (void)windowDidMove:(NSNotification *)notification

- (void)windowDidResize:(id)sender
{
if (resizingDueToMove)
{
if (resizingDueToMove) {
resizingDueToMove = NO;
return;
}

if (!setupDone || fullScreenEnabled) return;
if (!setupDone)
return;

// NOTE: We need to update the window frame size for Split View even though
// in full-screen on El Capitan or later.
if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_10_Max
&& fullScreenEnabled)
return;

// NOTE: Since we have no control over when the window may resize (Cocoa
// may resize automatically) we simply set the view to fill the entire
Expand Down Expand Up @@ -1212,6 +1218,15 @@ - (void)windowWillEnterFullScreen:(NSNotification *)notification
}
}

- (void)windowDidEnterFullScreen:(NSNotification *)notification
{
if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_10_Max) {
// NOTE: On El Capitan, we need to redraw the view when entering
// full-screen using :fullscreen option (including Ctrl-Cmd-f).
[vimController sendMessage:BackingPropertiesChangedMsgID data:nil];
}
}

- (void)windowDidFailToEnterFullScreen:(NSWindow *)window
{
// NOTE: This message can be called without
Expand Down Expand Up @@ -1280,6 +1295,15 @@ - (void)windowWillExitFullScreen:(NSNotification *)notification
}
}

- (void)windowDidExitFullScreen:(NSNotification *)notification
{
if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_10_Max) {
// NOTE: On El Capitan, we need to redraw the view when leaving
// full-screen by moving the window out from Split View.
[vimController sendMessage:BackingPropertiesChangedMsgID data:nil];
}
}

- (void)windowDidFailToExitFullScreen:(NSWindow *)window
{
// TODO: Is this the correct way to deal with this message? Are we still
Expand Down