xdg: send unconstrain events after a popup reposition (#3716)

* fix: Use unconstrain_from_box after reposition request

* chore: Remove unused include

* chore: remove variable specifier
This commit is contained in:
Dashie 2023-11-01 21:31:52 +01:00 committed by GitHub
parent a4db48b46b
commit 062f749450
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -185,6 +185,12 @@ void Events::listener_repositionPopupXDG(void* owner, void* data) {
PPOPUP->lastPos = {lx - extents.x, ly - extents.y};
PPOPUP->repositionRequested = true;
const auto PMONITOR = g_pCompositor->m_pLastMonitor;
wlr_box box = {PMONITOR->vecPosition.x - lx + PPOPUP->popup->current.geometry.x, PMONITOR->vecPosition.y - ly + PPOPUP->popup->current.geometry.y, PMONITOR->vecSize.x,
PMONITOR->vecSize.y};
wlr_xdg_popup_unconstrain_from_box(PPOPUP->popup, &box);
}
void Events::listener_unmapPopupXDG(void* owner, void* data) {