From 451659ec3487c5cd09f465327675ccfe463856c3 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Tue, 23 Aug 2022 16:52:36 +0200 Subject: [PATCH] fix oversized popup misalignment --- src/events/Popups.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }