diff --git a/gfx/drivers/metal.m b/gfx/drivers/metal.m index 5405005c13..591c0c975f 100644 --- a/gfx/drivers/metal.m +++ b/gfx/drivers/metal.m @@ -174,7 +174,9 @@ [apple_platform setVideoMode:mode]; +#ifdef HAVE_COCOATOUCH [self mtkView:view drawableSizeWillChange:CGSizeMake(mode.width, mode.height)]; +#endif *input = NULL; *inputData = NULL; diff --git a/ui/drivers/ui_cocoa.m b/ui/drivers/ui_cocoa.m index 907b0d2d83..b397a411a7 100644 --- a/ui/drivers/ui_cocoa.m +++ b/ui/drivers/ui_cocoa.m @@ -701,6 +701,10 @@ static ui_application_t ui_application_cocoa = { [self updateWindowedMode]; } + /* HACK(sgc): ensure MTKView posts a drawable resize event */ + if (mode.width > 0) + [self.window setContentSize:NSMakeSize(mode.width-1, mode.height)]; + [self.window setContentSize:NSMakeSize(mode.width, mode.height)]; [self.window displayIfNeeded]; }