Skip to content

Commit

Permalink
screencopy: fixup handle passing to the picker
Browse files Browse the repository at this point in the history
fixes #262
  • Loading branch information
vaxerski committed Sep 21, 2024
1 parent ac1b8c3 commit 5d64be5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shared/ScreencopyShared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 5d64be5

Please sign in to comment.