From c489b773856974e20156db28ab0545cef1fed821 Mon Sep 17 00:00:00 2001 From: "glassmancody.info" Date: Sun, 7 Nov 2021 20:01:07 -0800 Subject: [PATCH] fix windows aero snap --- CHANGELOG.md | 1 + apps/openmw/engine.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 548351acc0..6e540d02f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ Bug #5120: Scripted object spawning updates physics system Bug #5207: Loose summons can be present in scene Bug #5379: Wandering NPCs falling through cantons + Bug #5394: Windows snapping no longer works Bug #5453: Magic effect VFX are offset for creatures Bug #5483: AutoCalc flag is not used to calculate spells cost Bug #5508: Engine binary links to Qt without using it diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index 2d94c7422f..67944e4546 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -546,6 +546,10 @@ void OMW::Engine::createWindow(Settings::Manager& settings) if(fullscreen) flags |= SDL_WINDOW_FULLSCREEN; + // Allows for Windows snapping features to properly work in borderless window + SDL_SetHint("SDL_BORDERLESS_WINDOWED_STYLE", "1"); + SDL_SetHint("SDL_BORDERLESS_RESIZABLE_STYLE", "1"); + if (!windowBorder) flags |= SDL_WINDOW_BORDERLESS;