mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-07 15:37:14 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user