Fix opening window in another screen resulting in broken rendering

Fix the issue that MacVim's window will have broken rendering (wrong Vim
size) if the window was opened in another monitor. This was introduced
as part of the implementation for guioptions 'k',

The issue was that the function `moveWindowAcrossScreens` was buggy. It
sets a flag "resizingDueToMove" but doesn't unset it after the
`setFrameTopLeftPoint`, which may or may not call the resize function
that is responsible in unsetting "resizeDueToMove". Fix the function to
always unset it so that the flag doesn't leak till the next resize.
Previously it "worked" due to MacVim's excessive resize messages masking
the issue.
This commit is contained in:
Yee Cheng Chin
2018-08-18 20:36:07 -07:00
parent 0065c3fd3b
commit e35b0a69a7
+1 -3
View File
@@ -363,11 +363,9 @@
// HACK! This method moves a window to a new origin and to a different
// screen. This is primarily useful to avoid a scenario where such a move
// will trigger a resize, even though the frame didn't actually change size.
// This method should not be called unless the new origin is definitely on
// a different screen, otherwise the next legitimate resize message will
// be skipped.
resizingDueToMove = YES;
[[self window] setFrameTopLeftPoint:topLeft];
resizingDueToMove = NO;
}
- (void)updateTabsWithData:(NSData *)data