diff --git a/core/audio/plugin_host/plugin_host.cpp b/core/audio/plugin_host/plugin_host.cpp index efb7e7e..9259955 100644 --- a/core/audio/plugin_host/plugin_host.cpp +++ b/core/audio/plugin_host/plugin_host.cpp @@ -67,6 +67,7 @@ void plugin_host::create_and_open_editor() { return; } on_open_editor(handle); + spdlog::info("{} window created", name.c_str()); } void plugin_host::destroy_editor() { diff --git a/core/window/window_manager.cpp b/core/window/window_manager.cpp index d47f8ba..11e0a1b 100644 --- a/core/window/window_manager.cpp +++ b/core/window/window_manager.cpp @@ -89,13 +89,19 @@ void window_manager::on_host_window_close(GLFWwindow* window) { return info.second.window.get() == window; }); if (f != host_infos_.end()) { - f->first->editor_opened = false; - f->first->on_close_editor(); + auto& info = f->second; + auto host = f->first; + + host->editor_opened = false; + host->on_close_editor(); + int x, y; glfwGetWindowPos(window, &x, &y); - f->second.x = x; - f->second.y = y; - f->second.window.reset(); + info.x = x; + info.y = y; + info.window.reset(); + + spdlog::info("{} window close", host->name.c_str()); } } diff --git a/core/window/window_manager.h b/core/window/window_manager.h index ba7a3ca..ffbe902 100644 --- a/core/window/window_manager.h +++ b/core/window/window_manager.h @@ -13,7 +13,7 @@ public: void release(singleton_release_guard& release_guard) override; std::shared_ptr create_window(int width, int height, const char* title); - void* create_plugin_window(plugin_host* host); + auto create_plugin_window(plugin_host* host) -> void*; void destroy_plugin_window(plugin_host* host); void resize_plugin_window(plugin_host* host, int width, int height); const char* get_name() override { return "window_manager"; }