From 121df0ef39c10e6f016b02fd92920f3f9c40b595 Mon Sep 17 00:00:00 2001 From: Nemirtingas Date: Tue, 15 Oct 2019 14:54:06 +0200 Subject: [PATCH] Uncomment thing --- ImGui/impls/linux/imgui_impl_x11.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ImGui/impls/linux/imgui_impl_x11.cpp b/ImGui/impls/linux/imgui_impl_x11.cpp index f5f3666..0175dbd 100644 --- a/ImGui/impls/linux/imgui_impl_x11.cpp +++ b/ImGui/impls/linux/imgui_impl_x11.cpp @@ -151,12 +151,12 @@ static void ImGui_ImplX11_UpdateMousePos() ImGuiIO& io = ImGui::GetIO(); // Set OS mouse position if requested (rarely used, only when ImGuiConfigFlags_NavEnableSetMousePos is enabled by user) - //if (io.WantSetMousePos) - //{ + if (io.WantSetMousePos) + { // POINT pos = { (int)io.MousePos.x, (int)io.MousePos.y }; // ::ClientToScreen(g_hWnd, &pos); // ::SetCursorPos(pos.x, pos.y); - //} + } // Set mouse position Window unused_window; @@ -165,8 +165,7 @@ static void ImGui_ImplX11_UpdateMousePos() XQueryPointer(g_Display, g_Window, &unused_window, &unused_window, &rx, &ry, &x, &y, &mask); - io.MousePos.x = x; - io.MousePos.y = y; + io.MousePos = ImVec2((float)x, (float)y); } // Gamepad navigation mapping