diff options
| author | Dashie <fabio.lenherr@gmail.com> | 2023-11-01 21:31:52 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-01 20:31:52 +0000 |
| commit | 062f749450da9d280f85d3052d7f8bc9b70db62b (patch) | |
| tree | 6d9d4bde66f78000ab2e92c0beda7db224b682b9 /src | |
| parent | a4db48b46b9b92b5a04b1f34490cb38802942656 (diff) | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/events/Popups.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/events/Popups.cpp b/src/events/Popups.cpp index 570963d9..559c8410 100644 --- a/src/events/Popups.cpp +++ b/src/events/Popups.cpp @@ -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) { |
