fix handle finding

This commit is contained in:
vaxerski 2022-12-05 17:57:59 +00:00
parent 9fb24ac1e9
commit 6cf716f182

View file

@ -920,9 +920,10 @@ 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;
}