From 6cf716f182d2cd7deb26a5ba966657bdbedb9c1f Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Mon, 5 Dec 2022 17:57:59 +0000 Subject: [PATCH] fix handle finding --- src/Compositor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 9cf5e272..cbb8218b 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -920,8 +920,9 @@ CWindow* CCompositor::getWindowFromSurface(wlr_surface* pSurface) { CWindow* CCompositor::getWindowFromHandle(uint32_t handle) { for (auto& w : m_vWindows) { - if ((uintptr_t)w.get() == (uintptr_t)handle) + if ((uint32_t)(((uint64_t)w.get()) & 0xFFFFFFFF) == handle) { return w.get(); + } } return nullptr;