From 27be3fb0d4e12c4bf1dae75ddab97e1445304858 Mon Sep 17 00:00:00 2001 From: Asuro Date: Thu, 21 Jul 2022 16:18:54 +0200 Subject: [PATCH] cleanup --- AsuroTool/ApplicationData.h | 2 -- AsuroTool/AsuroTool.cpp | 9 ++------- ImguiBase/ImguiBase.h | 2 ++ 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/AsuroTool/ApplicationData.h b/AsuroTool/ApplicationData.h index 83db3ef..be00363 100644 --- a/AsuroTool/ApplicationData.h +++ b/AsuroTool/ApplicationData.h @@ -41,8 +41,6 @@ class ApplicationSettings { public: bool docked = false; bool showDisabledDevices = false; - bool fitWindowHeight = true; - bool minimizeToTray = true; }; class ApplicationData { diff --git a/AsuroTool/AsuroTool.cpp b/AsuroTool/AsuroTool.cpp index e6d8cb4..dec7e9a 100644 --- a/AsuroTool/AsuroTool.cpp +++ b/AsuroTool/AsuroTool.cpp @@ -117,7 +117,7 @@ void init(DrawData& drawData, ApplicationData& appData) // Set window minimize behavior glfwSetWindowIconifyCallback(drawData.window, [](GLFWwindow* window, int isIconified) { - if (isIconified && hackyAppData->settings.minimizeToTray) + if (isIconified && hackyAppData->settings.docked) { glfwHideWindow(window); } @@ -191,10 +191,7 @@ void draw(DrawData& drawData, ApplicationData& appData) customYCursor += audioDeviceWindow(appData, appData.audioData->recordingDevices, " \xEE\xBD\x8F Recording").y; // Resize viewport - if (appData.settings.fitWindowHeight) - { - drawData.window_size.y = customYCursor; - } + drawData.window_size.y = customYCursor; if (appData.settings.docked) { @@ -231,8 +228,6 @@ ImVec2 menuBar(DrawData& drawData, ApplicationData& appData) } ImGui::Checkbox("Show Disabled Devices", &appData.settings.showDisabledDevices); - ImGui::Checkbox("Fit Window Height", &appData.settings.fitWindowHeight); - ImGui::Checkbox("Minimize To Tray", &appData.settings.minimizeToTray); ImGui::EndMenu(); } diff --git a/ImguiBase/ImguiBase.h b/ImguiBase/ImguiBase.h index 903de6a..100e042 100644 --- a/ImguiBase/ImguiBase.h +++ b/ImguiBase/ImguiBase.h @@ -360,6 +360,7 @@ int startImgui(ImGuiCallbacks& callbacks, const char* title, int windowWidth, in return 1; glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); + glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE); GLFWwindow* window = glfwCreateWindow(windowWidth, windowHeight, title, NULL, NULL); // Setup Vulkan @@ -438,6 +439,7 @@ int startImgui(ImGuiCallbacks& callbacks, const char* title, int windowWidth, in { callbacks.initFunc(drawData); } + glfwShowWindow(window); // Upload Fonts {