From 2c51e2ce8dfdda66347fbb93cef740e8c18fe401 Mon Sep 17 00:00:00 2001 From: Kazuki Sakamoto Date: Fri, 9 Oct 2015 22:51:37 -0700 Subject: [PATCH] Fix full-screen redraw issues on El Capitan On El Capitan, we need to redraw the view when entering full-screen using :fullscreen option (including Ctrl-Cmd-f), and leaving full-screen by moving the window out from Split View. --- src/MacVim/MMWindowController.m | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/MacVim/MMWindowController.m b/src/MacVim/MMWindowController.m index 6870f235f0..dd70f89fb1 100644 --- a/src/MacVim/MMWindowController.m +++ b/src/MacVim/MMWindowController.m @@ -1218,6 +1218,24 @@ } } +- (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)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)windowDidFailToEnterFullScreen:(NSWindow *)window { // NOTE: This message can be called without