Brought Cocoa rectangle inits in sync

This commit is contained in:
Jack Andersen 2016-01-02 18:05:21 -10:00
parent 7eeebce37c
commit 4b99795b61

View File

@ -1107,8 +1107,8 @@ static boo::ESpecialKey translateKeycode(short code)
- (void)reshape - (void)reshape
{ {
boo::SWindowRect rect = {{int(self.frame.origin.x), int(self.frame.origin.y)}, boo::SWindowRect rect = {int(self.frame.origin.x), int(self.frame.origin.y),
{int(self.frame.size.width), int(self.frame.size.height)}}; int(self.frame.size.width), int(self.frame.size.height)};
if (resp->booContext->m_callback) if (resp->booContext->m_callback)
resp->booContext->m_callback->resized(rect); resp->booContext->m_callback->resized(rect);
[super reshape]; [super reshape];
@ -1177,8 +1177,8 @@ static boo::ESpecialKey translateKeycode(short code)
- (void)reshapeHandler - (void)reshapeHandler
{ {
boo::SWindowRect rect = {{int(self.frame.origin.x), int(self.frame.origin.y)}, boo::SWindowRect rect = {int(self.frame.origin.x), int(self.frame.origin.y),
{int(self.frame.size.width), int(self.frame.size.height)}}; int(self.frame.size.width), int(self.frame.size.height)};
boo::MetalContext::Window& w = m_ctx->m_windows[m_window]; boo::MetalContext::Window& w = m_ctx->m_windows[m_window];
std::unique_lock<std::mutex> lk(w.m_resizeLock); std::unique_lock<std::mutex> lk(w.m_resizeLock);
if (resp->booContext->m_callback) if (resp->booContext->m_callback)