Fix window resize on Skia/OSX

This commit is contained in:
David Capello 2015-10-13 18:49:56 -03:00
parent 0a1f492c24
commit 47f493df78
2 changed files with 3 additions and 7 deletions

View File

@ -34,8 +34,6 @@ public:
OSXWindowImpl* m_impl;
OSXWindowDelegate* m_delegate;
int m_scale;
gfx::Size m_clientSize;
gfx::Size m_restoredSize;
}
- (OSXWindow*)initWithImpl:(OSXWindowImpl*)impl;
- (OSXWindowImpl*)impl;

View File

@ -23,9 +23,6 @@
m_scale = 1;
NSRect rect = NSMakeRect(0, 0, 640, 480);
m_clientSize.w = m_restoredSize.w = rect.size.width;
m_clientSize.h = m_restoredSize.h = rect.size.height;
self = [self initWithContentRect:rect
styleMask:(NSTitledWindowMask | NSClosableWindowMask |
NSMiniaturizableWindowMask | NSResizableWindowMask)
@ -68,12 +65,13 @@
- (gfx::Size)clientSize
{
return m_clientSize;
return gfx::Size([[self contentView] frame].size.width,
[[self contentView] frame].size.height);
}
- (gfx::Size)restoredSize
{
return m_restoredSize;
return [self clientSize];
}
@end