mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-07 15:37:14 +02:00
Respond to backing properties changes
This fixes a bug which caused the window to be white after moving it between a Retina and normal display.
This commit is contained in:
@@ -2092,6 +2092,8 @@ static void netbeansReadCallback(CFSocketRef s,
|
||||
[self setImState:YES];
|
||||
} else if (DeactivatedImMsgID == msgid) {
|
||||
[self setImState:NO];
|
||||
} else if (BackingPropertiesChangedMsgID == msgid) {
|
||||
[self redrawScreen];
|
||||
} else {
|
||||
ASLogWarn(@"Unknown message received (msgid=%d)", msgid);
|
||||
}
|
||||
|
||||
@@ -1002,6 +1002,11 @@
|
||||
[vimView setFrameSize:[self contentSize]];
|
||||
}
|
||||
|
||||
- (void)windowDidChangeBackingProperties:(NSNotification *)notification
|
||||
{
|
||||
[vimController sendMessage:BackingPropertiesChangedMsgID data:nil];
|
||||
}
|
||||
|
||||
// This is not an NSWindow delegate method, our custom MMWindow class calls it
|
||||
// instead of the usual windowWillUseStandardFrame:defaultFrame:.
|
||||
- (IBAction)zoom:(id)sender
|
||||
|
||||
@@ -192,6 +192,7 @@ enum {
|
||||
SetTooltipDelayMsgID,
|
||||
GestureMsgID,
|
||||
AddToMRUMsgID,
|
||||
BackingPropertiesChangedMsgID,
|
||||
LastMsgID // NOTE: MUST BE LAST MESSAGE IN ENUM!
|
||||
};
|
||||
|
||||
|
||||
@@ -99,6 +99,7 @@ char *MessageStrings[] =
|
||||
"SetTooltipDelayMsgID",
|
||||
"GestureMsgID",
|
||||
"AddToMRUMsgID",
|
||||
"BackingPropertiesChangedMsgID",
|
||||
"END OF MESSAGE IDs" // NOTE: Must be last!
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user