From 3730196c3e8227adfc182828f1a859f8b9b08249 Mon Sep 17 00:00:00 2001 From: BambooFury Date: Sun, 5 Jul 2026 10:09:28 +0300 Subject: [PATCH 1/2] build: set CMAKE_POLICY_VERSION_MINIMUM before fetching deps so glew configures on CMake 4.x --- resources/cmake/bootstrap_deps.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/cmake/bootstrap_deps.cmake b/resources/cmake/bootstrap_deps.cmake index d6031b8..e62c47c 100644 --- a/resources/cmake/bootstrap_deps.cmake +++ b/resources/cmake/bootstrap_deps.cmake @@ -77,6 +77,10 @@ set(JSON_Install OFF CACHE BOOL "" FORCE) # FetchContent declarations # ============================================================================ include(FetchContent) +# CMake 4.x rejects cmake_minimum_required < 3.5 declared by glew-cmake 2.2.0. +# The in-place patch below runs too late (after FetchContent_MakeAvailable has +# already configured glew), so raise the floor for all fetched deps up front. +set(CMAKE_POLICY_VERSION_MINIMUM 3.5) set(THIRDPARTY_DIR "${CMAKE_SOURCE_DIR}/thirdparty") message(STATUS "[Installer] Fetching dependencies...") From c3069550427bd30ec114dc9ef545ed09be83ba93 Mon Sep 17 00:00:00 2001 From: BambooFury Date: Sun, 5 Jul 2026 10:09:28 +0300 Subject: [PATCH 2/2] fix: force DWM frame recomposition after showing borderless window on non-150% scales --- src/window/renderer.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/window/renderer.cc b/src/window/renderer.cc index b948295..b7f45dd 100644 --- a/src/window/renderer.cc +++ b/src/window/renderer.cc @@ -51,6 +51,8 @@ #include #ifdef _WIN32 #include +#define GLFW_EXPOSE_NATIVE_WIN32 +#include #endif using namespace ImGui; @@ -433,6 +435,17 @@ void SpawnRendererThread(GLFWwindow* window, const char* glsl_version, std::shar if (!hasShown) { glfwShowWindow(window); +#ifdef _WIN32 + // Nudge the outer rect so DWM recomposites the borderless frame; otherwise the + // frame changed while hidden is composited stale on 100% scale displays. + HWND hWnd = glfwGetWin32Window(window); + RECT rect{}; + GetWindowRect(hWnd, &rect); + const int w = rect.right - rect.left; + const int h = rect.bottom - rect.top; + SetWindowPos(hWnd, NULL, 0, 0, w + 1, h, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE); + SetWindowPos(hWnd, NULL, 0, 0, w, h, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE); +#endif hasShown = true; }