mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-07 15:37:14 +02:00
Fix full-screen drawing issues
This commit fixes a problem where the screen would look blurry, or where each redraw would cause the entire screen to be cleared before the redraw (only the Core Text renderer was affected by this bug).
This commit is contained in:
@@ -308,9 +308,13 @@
|
||||
- (void)centerView
|
||||
{
|
||||
NSRect outer = [self frame], inner = [view frame];
|
||||
|
||||
NSPoint origin = NSMakePoint((outer.size.width - inner.size.width)/2,
|
||||
(outer.size.height - inner.size.height)/2);
|
||||
|
||||
// NOTE! Make sure the origin coordinates are integral or very strange
|
||||
// rendering issues may arise (screen looks blurry, each redraw clears the
|
||||
// entire window, etc.).
|
||||
NSPoint origin = { floor((outer.size.width - inner.size.width)/2),
|
||||
floor((outer.size.height - inner.size.height)/2) };
|
||||
|
||||
[view setFrameOrigin:origin];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user