From 5d64be5bd8356dd7ccffc51c9d0211dfbc816703 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 21 Sep 2024 15:45:34 +0100 Subject: [PATCH] screencopy: fixup handle passing to the picker fixes #262 --- src/shared/ScreencopyShared.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/ScreencopyShared.cpp b/src/shared/ScreencopyShared.cpp index a8c6888..63e6a47 100644 --- a/src/shared/ScreencopyShared.cpp +++ b/src/shared/ScreencopyShared.cpp @@ -29,7 +29,7 @@ std::string buildWindowList() { for (auto& e : g_pPortalManager->m_sHelpers.toplevel->m_vToplevels) { - result += std::format("{}[HC>]{}[HT>]{}[HE>]", (uint32_t)(((uint64_t)e->handle) & 0xFFFFFFFF), sanitizeNameForWindowList(e->windowClass), + result += std::format("{}[HC>]{}[HT>]{}[HE>]", (uint32_t)(((uint64_t)e->handle->resource()) & 0xFFFFFFFF), sanitizeNameForWindowList(e->windowClass), sanitizeNameForWindowList(e->windowTitle)); } @@ -88,7 +88,7 @@ SSelectionData promptForScreencopySelection() { data.windowHandle = nullptr; for (auto& e : g_pPortalManager->m_sHelpers.toplevel->m_vToplevels) { - uint32_t handleLoE = (uint32_t)(((uint64_t)e->handle) & 0xFFFFFFFF); + uint32_t handleLoE = (uint32_t)(((uint64_t)e->handle->resource()) & 0xFFFFFFFF); if (handleLoE == handleLo) { data.windowHandle = e->handle;