diff --git a/main/gui/source/window/win_window.cpp b/main/gui/source/window/win_window.cpp index dd6632a80..3f436405b 100644 --- a/main/gui/source/window/win_window.cpp +++ b/main/gui/source/window/win_window.cpp @@ -551,6 +551,16 @@ namespace hex { }); ImGui::GetIO().ConfigDebugIsDebuggerPresent = ::IsDebuggerPresent(); + + glfwSetFramebufferSizeCallback(m_window, [](GLFWwindow* window, int width, int height) { + auto *win = static_cast(glfwGetWindowUserPointer(window)); + win->m_unlockFrameRate = true; + + glViewport(0, 0, width, height); + ImHexApi::System::impl::setMainWindowSize(width, height); + + win->fullFrame(); + }); } void Window::beginNativeWindowFrame() { diff --git a/main/gui/source/window/window.cpp b/main/gui/source/window/window.cpp index 206aa5d30..a6d4a5a41 100644 --- a/main/gui/source/window/window.cpp +++ b/main/gui/source/window/window.cpp @@ -820,12 +820,14 @@ namespace hex { // Register window resize callback glfwSetWindowSizeCallback(m_window, [](GLFWwindow *window, int width, int height) { - if (!glfwGetWindowAttrib(window, GLFW_ICONIFIED)) - ImHexApi::System::impl::setMainWindowSize(width, height); - auto win = static_cast(glfwGetWindowUserPointer(window)); win->m_unlockFrameRate = true; - + + #if !defined(OS_WINDOWS) + if (!glfwGetWindowAttrib(window, GLFW_ICONIFIED)) + ImHexApi::System::impl::setMainWindowSize(width, height); + #endif + #if defined(OS_MACOS) // Stop widgets registering hover effects while the window is being resized if (macosIsWindowBeingResizedByUser(window)) { diff --git a/plugins/builtin/source/content/window_decoration.cpp b/plugins/builtin/source/content/window_decoration.cpp index 148721084..c58ceecf1 100644 --- a/plugins/builtin/source/content/window_decoration.cpp +++ b/plugins/builtin/source/content/window_decoration.cpp @@ -462,7 +462,6 @@ namespace hex::plugin::builtin { constexpr static ImGuiWindowFlags windowFlags = ImGuiWindowFlags_MenuBar | ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoNavFocus | ImGuiWindowFlags_NoBringToFrontOnFocus | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse; - // Handle all undocked floating windows ImGuiViewport *viewport = ImGui::GetMainViewport(); ImGui::SetNextWindowPos(viewport->WorkPos); ImGui::SetNextWindowSize(ImHexApi::System::getMainWindowSize() - ImVec2(0, ImGui::GetTextLineHeightWithSpacing())); @@ -490,7 +489,7 @@ namespace hex::plugin::builtin { footerHeight += ImGui::GetStyle().FramePadding.y * 2; #endif - const auto dockSpaceSize = ImVec2(ImHexApi::System::getMainWindowSize().x - sidebarWidth, ImGui::GetContentRegionAvail().y - footerHeight); + const auto dockSpaceSize = ImHexApi::System::getMainWindowSize() - ImVec2(sidebarWidth, menuBarHeight * 2 + footerHeight); ImGui::SetCursorPosX(sidebarWidth); drawFooter(drawList, dockSpaceSize, footerHeight);