mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 13:05:25 -05:00
fix: More window focus event issues
This commit is contained in:
@@ -357,24 +357,6 @@ namespace hex::plugin::builtin {
|
||||
if (ctx == nullptr)
|
||||
return;
|
||||
|
||||
// Close any open non-modal popups when ImHex loses focus
|
||||
// Disable this in debug mode though to allow for easier debugging
|
||||
#if !defined(DEBUG)
|
||||
if (ImGui::IsPopupOpen("", ImGuiPopupFlags_AnyPopup)) {
|
||||
for (const auto& popup : ctx->OpenPopupStack) {
|
||||
if (popup.Window == nullptr)
|
||||
continue;
|
||||
|
||||
if (!(popup.Window->Flags & ImGuiWindowFlags_Modal)) {
|
||||
ctx->OpenPopupStack.erase_unsorted(&popup);
|
||||
log::debug("Closing popup '{}' because the main window lost focus", popup.Window->Name ? popup.Window->Name : "Unknown Popup");
|
||||
break;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (ImGui::IsAnyItemHovered())
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user