summaryrefslogtreecommitdiff
path: root/src/events/Popups.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-04-06 19:24:20 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-04-06 19:24:20 +0200
commitc7cc9d49d22172dd6d62ae8560bfd7a699e0051b (patch)
treecc6e7d4ff6b0dae9ff914d815a6b9634702a7ab4 /src/events/Popups.cpp
parenta86bc76b9a0577a99a4d87ce6ce4bf2baa7f842e (diff)
unconstrain popups properly
Diffstat (limited to 'src/events/Popups.cpp')
-rw-r--r--src/events/Popups.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/events/Popups.cpp b/src/events/Popups.cpp
index 678951d5..f576be9a 100644
--- a/src/events/Popups.cpp
+++ b/src/events/Popups.cpp
@@ -50,7 +50,10 @@ void createNewPopup(wlr_xdg_popup* popup, SXDGPopup* pHyprPopup) {
const auto PMONITOR = g_pCompositor->m_pLastMonitor;
- wlr_box box = {.x = PMONITOR->vecPosition.x, .y = PMONITOR->vecPosition.y, .width = PMONITOR->vecSize.x, .height = PMONITOR->vecSize.y};
+ double lx = 0, ly = 0;
+ wlr_output_layout_output_coords(g_pCompositor->m_sWLROutputLayout, PMONITOR->output, &lx, &ly);
+
+ wlr_box box = {.x = lx, .y = ly, .width = PMONITOR->vecSize.x, .height = PMONITOR->vecSize.y};
wlr_xdg_popup_unconstrain_from_box(popup, &box);