aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-07-31 14:05:47 +0200
committervaxerski <[email protected]>2022-07-31 14:05:47 +0200
commit76f7c2510e267bb695ae4fd175ac2f3db8557dba (patch)
tree2674120f6e47a0405f6b06e2d958728942d60cee /src
parent2230f0ccaa24974dfb4facd2f115d4fcd7c467bd (diff)
downloadHyprland-76f7c2510e267bb695ae4fd175ac2f3db8557dba.tar.gz
Hyprland-76f7c2510e267bb695ae4fd175ac2f3db8557dba.zip
account for geom in initial XDG window popups
Diffstat (limited to 'src')
-rw-r--r--src/events/Popups.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/events/Popups.cpp b/src/events/Popups.cpp
index 53f8de8e..c1856ac9 100644
--- a/src/events/Popups.cpp
+++ b/src/events/Popups.cpp
@@ -104,9 +104,12 @@ void Events::listener_newPopupXDG(void* owner, void* data) {
const auto PMONITOR = g_pCompositor->getMonitorFromID(PWINDOW->m_iMonitorID);
+ wlr_box geom;
+ wlr_xdg_surface_get_geometry(PWINDOW->m_uSurface.xdg, &geom);
+
PNEWPOPUP->popup = WLRPOPUP;
- PNEWPOPUP->lx = PWINDOW->m_vRealPosition.goalv().x;
- PNEWPOPUP->ly = PWINDOW->m_vRealPosition.goalv().y;
+ PNEWPOPUP->lx = PWINDOW->m_vRealPosition.goalv().x - geom.x;
+ PNEWPOPUP->ly = PWINDOW->m_vRealPosition.goalv().y - geom.y;
PNEWPOPUP->parentWindow = PWINDOW;
PNEWPOPUP->monitor = PMONITOR;
createNewPopup(WLRPOPUP, PNEWPOPUP);