mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-05-28 00:21:57 +02:00
Fix for dragging full screen window in Spaces
Ensure the full screen window is still covering the screen after having dragged it in Spaces (or moved it in any other manner).
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
- (BOOL)isOnPrimaryScreen;
|
||||
- (void)handleWindowDidBecomeMainNotification:(NSNotification *)notification;
|
||||
- (void)handleWindowDidResignMainNotification:(NSNotification *)notification;
|
||||
- (void)windowDidMove:(NSNotification *)notification;
|
||||
- (void)applicationDidChangeScreenParameters:(NSNotification *)notification;
|
||||
- (void)resizeVimView;
|
||||
@end
|
||||
@@ -90,6 +91,11 @@
|
||||
name:NSWindowDidResignMainNotification
|
||||
object:self];
|
||||
|
||||
[nc addObserver:self
|
||||
selector:@selector(windowDidMove:)
|
||||
name:NSWindowDidMoveNotification
|
||||
object:self];
|
||||
|
||||
[nc addObserver:self
|
||||
selector:@selector(applicationDidChangeScreenParameters:)
|
||||
name:NSApplicationDidChangeScreenParametersNotification
|
||||
@@ -379,6 +385,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)windowDidMove:(NSNotification *)notification
|
||||
{
|
||||
// Window may move as a result of being dragged between Spaces.
|
||||
ASLogDebug(@"Full screen window moved, ensuring it covers the screen...");
|
||||
|
||||
// Ensure the full screen window is still covering the entire screen and
|
||||
// then resize view according to 'fuopt'.
|
||||
[self setFrame:[[self screen] frame] display:NO];
|
||||
[self resizeVimView];
|
||||
}
|
||||
|
||||
- (void)applicationDidChangeScreenParameters:(NSNotification *)notification
|
||||
{
|
||||
// This notification is sent when screen resolution may have changed (e.g.
|
||||
|
||||
Reference in New Issue
Block a user