mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-19 06:26:35 +00:00
Docking+Viewport: Fixed PlatformRequestClose (e.g. ALT-F4) being redrected to the first window of the docking node instead of the selected one.
This commit is contained in:
parent
67be485e24
commit
79c075ca09
@ -5422,9 +5422,12 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|||||||
// Close from platform window
|
// Close from platform window
|
||||||
if (p_open != NULL && window->Viewport->PlatformRequestClose && window->Viewport != GetMainViewport())
|
if (p_open != NULL && window->Viewport->PlatformRequestClose && window->Viewport != GetMainViewport())
|
||||||
{
|
{
|
||||||
window->Viewport->PlatformRequestClose = false;
|
if (!window->DockIsActive || window->DockTabIsVisible)
|
||||||
g.NavWindowingToggleLayer = false; // Assume user mapped PlatformRequestClose on ALT-F4 so we disable ALT for menu toggle. False positive not an issue.
|
{
|
||||||
*p_open = false;
|
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.
|
||||||
|
*p_open = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Title bar
|
// Title bar
|
||||||
|
Loading…
Reference in New Issue
Block a user