fix handle finding

This commit is contained in:
vaxerski 2022-12-05 17:57:59 +00:00
parent 9fb24ac1e9
commit 6cf716f182
1 changed files with 2 additions and 1 deletions

View File

@ -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;