Bug: Automatic window resize on focus

If you try to change size of Standalone window, then switch to something else and then will give focus back to the window - it will reset it’s size and position to initials.

I believe it’s a bug, because the code, that controlling this annoying behaviour:

// As we've just been activated, attempt to restore the resolution that the engine previously cached.
// This allows us to force ourselves back to the correct resolution after alt-tabbing out of a fullscreen
// window and then going back in again.

was supposed to be triggered only for the case of going to full screen mode and back.
Commenting this out solves the issue and does not harm Alt+Enter / Alt+Tab switches.

I agree. We initially ran into the issue trying to control the window position from C++ using SWindow functions but all changes were lost as soon as we gave the focus back. The only workaround so far for us that works is to control the window using the GameUserSettings functions but we lose some control (such as running in fullscreen on a 2nd display).

I did not intend to recompile the engine but I am now tempted to apply your suggested fix.

The bug is still there (4.14.3)

Thanks for the suggestion.