From bf2cf898ccdc554cc8da3c6c2d75508e27588b7e Mon Sep 17 00:00:00 2001 From: saschawillems Date: Tue, 31 Oct 2017 11:53:17 +0100 Subject: [PATCH] Check ImGui mousecapture and don't propagate event --- base/vulkanexamplebase.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/base/vulkanexamplebase.cpp b/base/vulkanexamplebase.cpp index b77dc636..36472a7f 100644 --- a/base/vulkanexamplebase.cpp +++ b/base/vulkanexamplebase.cpp @@ -1154,6 +1154,10 @@ void VulkanExampleBase::handleMessages(HWND hWnd, UINT uMsg, WPARAM wParam, LPAR case WM_MOUSEMOVE: { bool handled = false; + + ImGuiIO& io = ImGui::GetIO(); + handled = io.WantCaptureMouse; + int32_t posx = LOWORD(lParam); int32_t posy = HIWORD(lParam); mouseMoved((float)posx, (float)posy, handled);