From 0f8ac672f391aed62a73e03dd937a4d6e7a22edb Mon Sep 17 00:00:00 2001 From: WerWolv Date: Thu, 4 Aug 2022 09:51:07 +0200 Subject: [PATCH] sys: Fixed compile issue on non-Windows --- lib/external/imgui/source/imgui_impl_glfw.cpp | 2 +- main/source/window/linux_window.cpp | 4 ++++ main/source/window/macos_window.cpp | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/external/imgui/source/imgui_impl_glfw.cpp b/lib/external/imgui/source/imgui_impl_glfw.cpp index 10178005c..ac025c75f 100644 --- a/lib/external/imgui/source/imgui_impl_glfw.cpp +++ b/lib/external/imgui/source/imgui_impl_glfw.cpp @@ -128,7 +128,6 @@ struct ImGui_ImplGlfw_Data bool WantUpdateMonitors; #ifdef _WIN32 WNDPROC GlfwWndProc; - bool BorderlessWindow; // IMHEX PATCH #endif // Chain GLFW callbacks: our callbacks will call the user's previously installed callbacks, if any. @@ -140,6 +139,7 @@ struct ImGui_ImplGlfw_Data GLFWkeyfun PrevUserCallbackKey; GLFWcharfun PrevUserCallbackChar; GLFWmonitorfun PrevUserCallbackMonitor; + bool BorderlessWindow; // IMHEX PATCH ImGui_ImplGlfw_Data() { memset((void*)this, 0, sizeof(*this)); } }; diff --git a/main/source/window/linux_window.cpp b/main/source/window/linux_window.cpp index 51772b2b5..2fd9512e0 100644 --- a/main/source/window/linux_window.cpp +++ b/main/source/window/linux_window.cpp @@ -13,6 +13,8 @@ #include #include + #include + namespace hex { void Window::initNative() { @@ -22,6 +24,8 @@ namespace hex { } void Window::setupNativeWindow() { + ImGui_ImplGlfw_SetBorderlessWindowMode(false); + bool themeFollowSystem = ImHexApi::System::usesSystemThemeDetection(); EventManager::subscribe(this, [themeFollowSystem] { if (!themeFollowSystem) return; diff --git a/main/source/window/macos_window.cpp b/main/source/window/macos_window.cpp index 80422d52a..8e3e9320b 100644 --- a/main/source/window/macos_window.cpp +++ b/main/source/window/macos_window.cpp @@ -12,6 +12,8 @@ #include #include + #include + namespace hex { void Window::initNative() { @@ -21,6 +23,8 @@ namespace hex { } void Window::setupNativeWindow() { + ImGui_ImplGlfw_SetBorderlessWindowMode(false); + bool themeFollowSystem = ImHexApi::System::usesSystemThemeDetection(); EventManager::subscribe(this, [themeFollowSystem] { if (!themeFollowSystem) return;