fix oversized popup misalignment

This commit is contained in:
vaxerski 2022-08-23 16:52:36 +02:00
parent a9e34cba93
commit 451659ec34

View file

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