diff options
Diffstat (limited to 'src/events/Windows.cpp')
-rw-r--r-- | src/events/Windows.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index b84b9d2d..48571892 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -19,6 +19,14 @@ void addViewCoords(void* pWindow, int* x, int* y) { const auto PWINDOW = (CWindow*)pWindow; *x += PWINDOW->m_vRealPosition.goalv().x; *y += PWINDOW->m_vRealPosition.goalv().y; + + if (!PWINDOW->m_bIsX11) { + wlr_box geom; + wlr_xdg_surface_get_geometry(PWINDOW->m_uSurface.xdg, &geom); + + *x -= geom.x; + *y -= geom.y; + } } void Events::listener_mapWindow(void* owner, void* data) { |