Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions resources/cmake/bootstrap_deps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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...")
Expand Down
13 changes: 13 additions & 0 deletions src/window/renderer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
#include <thread>
#ifdef _WIN32
#include <windows.h>
#define GLFW_EXPOSE_NATIVE_WIN32
#include <GLFW/glfw3native.h>
#endif

using namespace ImGui;
Expand Down Expand Up @@ -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;
}

Expand Down