diff --git a/examples/common/entry/entry_osx.mm b/examples/common/entry/entry_osx.mm index 463f9200..8b1a7004 100644 --- a/examples/common/entry/entry_osx.mm +++ b/examples/common/entry/entry_osx.mm @@ -140,7 +140,7 @@ namespace entry NSWindow* window = m_window[handle.idx]; NSRect originalFrame = [window frame]; NSPoint location = [window mouseLocationOutsideOfEventStream]; - NSRect adjustFrame = [NSWindow contentRectForFrameRect: originalFrame styleMask: NSTitledWindowMask]; + NSRect adjustFrame = [window contentRectForFrameRect: originalFrame]; int x = location.x; int y = (int)adjustFrame.size.height - (int)location.y; @@ -585,8 +585,10 @@ namespace entry if (!s_ctx.m_fullscreen) { [NSMenu setMenuBarVisible: false]; + s_ctx.m_style &= ~NSTitledWindowMask; dispatch_async(dispatch_get_main_queue() , ^{ + [window setStyleMask: s_ctx.m_style]; [window setFrame:screenRect display:YES]; });