Viewport: Avoid unnecessary reapplying platform pos/size every frame. (#2205) + Fix GLFW ImGui_ImplGlfw_CreateWindow() from not applying position immediately. Clear LastNameHash properly (bug already fixed in Docking branch)

This commit is contained in:
omar
2018-11-23 15:50:33 +01:00
parent cae4d020dc
commit 862781b195
3 changed files with 15 additions and 9 deletions

View File

@ -409,6 +409,7 @@ static void ImGui_ImplGlfw_CreateWindow(ImGuiViewport* viewport)
data->Window = glfwCreateWindow((int)viewport->Size.x, (int)viewport->Size.y, "No Title Yet", NULL, share_window);
data->WindowOwned = true;
viewport->PlatformHandle = (void*)data->Window;
glfwSetWindowPos(data->Window, (int)viewport->Pos.x, (int)viewport->Pos.y);
// Install callbacks for secondary viewports
glfwSetMouseButtonCallback(data->Window, ImGui_ImplGlfw_MouseButtonCallback);