screencopy: fixup handle passing to the picker

fixes #262
This commit is contained in:
Vaxry 2024-09-21 15:45:34 +01:00
parent ac1b8c3067
commit 5d64be5bd8

View file

@ -29,7 +29,7 @@ std::string buildWindowList() {
for (auto& e : g_pPortalManager->m_sHelpers.toplevel->m_vToplevels) { 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)); sanitizeNameForWindowList(e->windowTitle));
} }
@ -88,7 +88,7 @@ SSelectionData promptForScreencopySelection() {
data.windowHandle = nullptr; data.windowHandle = nullptr;
for (auto& e : g_pPortalManager->m_sHelpers.toplevel->m_vToplevels) { 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) { if (handleLoE == handleLo) {
data.windowHandle = e->handle; data.windowHandle = e->handle;