From 5c7ba482d0dba7db3d934712cc02c49d897a9f63 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Mon, 24 Jul 2017 20:30:07 +0300 Subject: [PATCH] Improved macOS window resizing behaviour. Add redraw call to resize callback. --- platform/osx/os_osx.mm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 11047e7267f..5af305e4ee4 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -191,6 +191,12 @@ static bool mouse_down_control = false; OS_OSX::singleton->window_size.width = fbRect.size.width * OS_OSX::singleton->display_scale; OS_OSX::singleton->window_size.height = fbRect.size.height * OS_OSX::singleton->display_scale; + if (OS_OSX::singleton->main_loop) { + Main::force_redraw(); + //Event retrieval blocks until resize is over. Call Main::iteration() directly. + Main::iteration(); + } + //_GodotInputFramebufferSize(window, fbRect.size.width, fbRect.size.height); //_GodotInputWindowSize(window, contentRect.size.width, contentRect.size.height); //_GodotInputWindowDamage(window);