|
|
@ -3234,13 +3234,13 @@ static void ImGui::UpdateMovingWindow()
|
|
|
|
KeepAliveID(g.ActiveId);
|
|
|
|
KeepAliveID(g.ActiveId);
|
|
|
|
IM_ASSERT(g.MovingWindow && g.MovingWindow->RootWindow);
|
|
|
|
IM_ASSERT(g.MovingWindow && g.MovingWindow->RootWindow);
|
|
|
|
ImGuiWindow* moving_window = g.MovingWindow->RootWindow;
|
|
|
|
ImGuiWindow* moving_window = g.MovingWindow->RootWindow;
|
|
|
|
if (g.IO.MouseDown[0])
|
|
|
|
if (g.IO.MouseDown[0] && IsMousePosValid(&g.IO.MousePos))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ImVec2 pos = g.IO.MousePos - g.ActiveIdClickOffset;
|
|
|
|
ImVec2 pos = g.IO.MousePos - g.ActiveIdClickOffset;
|
|
|
|
if (moving_window->PosFloat.x != pos.x || moving_window->PosFloat.y != pos.y)
|
|
|
|
if (moving_window->PosFloat.x != pos.x || moving_window->PosFloat.y != pos.y)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MarkIniSettingsDirty(moving_window);
|
|
|
|
MarkIniSettingsDirty(moving_window);
|
|
|
|
moving_window->PosFloat = pos;
|
|
|
|
SetWindowPos(moving_window, pos, ImGuiCond_Always);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FocusWindow(g.MovingWindow);
|
|
|
|
FocusWindow(g.MovingWindow);
|
|
|
|
}
|
|
|
|
}
|
|
|
|