mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
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:
@ -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);
|
||||
|
Reference in New Issue
Block a user