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:
Bjorn Winckler
2013-06-09 15:34:36 +02:00
parent 871611e305
commit 798c96e2af
4 changed files with 9 additions and 0 deletions
+2
View File
@@ -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);
}
+5
View File
@@ -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
+1
View File
@@ -192,6 +192,7 @@ enum {
SetTooltipDelayMsgID,
GestureMsgID,
AddToMRUMsgID,
BackingPropertiesChangedMsgID,
LastMsgID // NOTE: MUST BE LAST MESSAGE IN ENUM!
};
+1
View File
@@ -99,6 +99,7 @@ char *MessageStrings[] =
"SetTooltipDelayMsgID",
"GestureMsgID",
"AddToMRUMsgID",
"BackingPropertiesChangedMsgID",
"END OF MESSAGE IDs" // NOTE: Must be last!
};