diff --git a/src/events/Popups.cpp b/src/events/Popups.cpp index 526919a1..f48f71be 100644 --- a/src/events/Popups.cpp +++ b/src/events/Popups.cpp @@ -151,7 +151,7 @@ void Events::listener_mapPopupXDG(void* owner, void* data) { wlr_box extents; wlr_surface_get_extends(PPOPUP->popup->base->surface, &extents); - g_pHyprRenderer->damageBox(lx, ly, extents.width + 2, extents.height + 2); + g_pHyprRenderer->damageBox(lx - extents.x, ly - extents.y, extents.width + 2, extents.height + 2); Debug::log(LOG, "XDG Popup got assigned a surfaceTreeNode %x", PPOPUP->pSurfaceTree); } @@ -170,7 +170,7 @@ void Events::listener_unmapPopupXDG(void* owner, void* data) { wlr_box extents; wlr_surface_get_extends(PPOPUP->popup->base->surface, &extents); - g_pHyprRenderer->damageBox(lx, ly, extents.width + 2, extents.height + 2); + g_pHyprRenderer->damageBox(lx - extents.x, ly - extents.y, extents.width + 2, extents.height + 2); PPOPUP->pSurfaceTree = nullptr; }