mirror of
https://github.com/ocornut/imgui.git
synced 2025-01-18 01:06:45 +01:00
Viewport: Avoid creating viewport on drag (fix cc882b07239b28b1dab6d46af72d3a463c92254a)
This commit is contained in:
parent
3b9b1956cd
commit
7b433605f9
@ -6229,7 +6229,8 @@ static void ImGui::UpdateSelectWindowViewport(ImGuiWindow* window)
|
||||
}
|
||||
else if (!window->ViewportOwned && g.MovingWindow && g.MovingWindow->RootWindow == window && IsMousePosValid())
|
||||
{
|
||||
window->Viewport = AddUpdateViewport(window, window->ID, window->Pos, window->Size, ImGuiViewportFlags_NoDecoration | ImGuiViewportFlags_NoFocusOnAppearing | ImGuiViewportFlags_NoInputs);
|
||||
if (!window->Viewport->GetRect().Contains(window->Rect()))
|
||||
window->Viewport = AddUpdateViewport(window, window->ID, window->Pos, window->Size, ImGuiViewportFlags_NoDecoration | ImGuiViewportFlags_NoFocusOnAppearing | ImGuiViewportFlags_NoInputs);
|
||||
}
|
||||
else if (!window->ViewportOwned && GetWindowAlwaysWantOwnViewport(window))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user