This commit is contained in:
Бранимир Караџић 2019-04-26 19:33:32 -07:00
parent 62ea70c449
commit 2747c75e0a
1 changed files with 59 additions and 59 deletions

View File

@ -551,7 +551,8 @@ namespace entry
{
void (^createWindowBlock)(void) = ^(void) {
NSRect rect = NSMakeRect(_x, _y, _width, _height);
NSWindow* window = [[NSWindow alloc]
NSWindow* window = [
[NSWindow alloc]
initWithContentRect:rect
styleMask:s_ctx.m_style
backing:NSBackingStoreBuffered defer:NO
@ -586,8 +587,8 @@ namespace entry
{
if (isValid(_handle))
{
dispatch_async(dispatch_get_main_queue(), ^(void)
{
dispatch_async(dispatch_get_main_queue()
, ^(void){
NSWindow *window = s_ctx.m_window[_handle.idx];
if ( NULL != window)
{
@ -659,7 +660,6 @@ namespace entry
{
dispatch_async(dispatch_get_main_queue()
, ^{
NSWindow* window = s_ctx.m_window[_handle.idx];
NSScreen* screen = [window screen];
NSRect screenRect = [screen frame];