diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-06-22 15:45:56 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-06-22 15:45:56 +0200 |
| commit | 770bada5d541e737ae17744f70eb019494471a29 (patch) | |
| tree | 9be90ba75ffed8b22cbe98d4db3468b93ff813df /src/events/Windows.cpp | |
| parent | 499d2e41bfbc76525c3f03e1fb0a057b910c0c4b (diff) | |
Fixed oversized apps' incorrect layout
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) { |
