|
@@ -7227,16 +7227,12 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|
|
if (want_focus && window == g.NavWindow)
|
|
|
NavInitWindow(window, false); // <-- this is in the way for us to be able to defer and sort reappearing FocusWindow() calls
|
|
|
|
|
|
- // Close requested by platform window
|
|
|
+ // Close requested by platform window (apply to all windows in this viewport)
|
|
|
if (p_open != NULL && window->Viewport->PlatformRequestClose && window->Viewport != GetMainViewport())
|
|
|
{
|
|
|
- if (!window->DockIsActive || window->DockTabIsVisible)
|
|
|
- {
|
|
|
- window->Viewport->PlatformRequestClose = false;
|
|
|
- g.NavWindowingToggleLayer = false; // Assume user mapped PlatformRequestClose on ALT-F4 so we disable ALT for menu toggle. False positive not an issue.
|
|
|
- IMGUI_DEBUG_LOG_VIEWPORT("[viewport] Window '%s' PlatformRequestClose\n", window->Name);
|
|
|
- *p_open = false;
|
|
|
- }
|
|
|
+ IMGUI_DEBUG_LOG_VIEWPORT("[viewport] Window '%s' closed by PlatformRequestClose\n", window->Name);
|
|
|
+ *p_open = false;
|
|
|
+ g.NavWindowingToggleLayer = false; // Assume user mapped PlatformRequestClose on ALT-F4 so we disable ALT for menu toggle. False positive not an issue. // FIXME-NAV: Try removing.
|
|
|
}
|
|
|
|
|
|
// Title bar
|