diff options
| author | xDarksome <dev@darkso.me> | 2022-06-24 18:58:11 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-24 18:58:11 +0300 |
| commit | be460ea9547691eb136bf8b600b67b778af47e3f (patch) | |
| tree | b74869ad39dd804aec31694d4dd429822c223644 /src/events/Windows.cpp | |
| parent | 776ca3baf269059e8c13ba8b625645215e71f78c (diff) | |
| parent | e7467c60f9fe9e66c74dd8dc7c752a73ed4bc4db (diff) | |
Merge branch 'hyprwm:main' into main
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) { |
