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/managers/input/InputManager.cpp | |
| parent | 499d2e41bfbc76525c3f03e1fb0a057b910c0c4b (diff) | |
Fixed oversized apps' incorrect layout
Diffstat (limited to 'src/managers/input/InputManager.cpp')
| -rw-r--r-- | src/managers/input/InputManager.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 63e2d970..6bc59472 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -172,6 +172,14 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { Vector2D surfaceLocal = surfacePos == Vector2D(-1337, -1337) ? surfaceCoords : mouseCoords - surfacePos; + if (pFoundWindow && !pFoundWindow->m_bIsX11 && surfacePos != Vector2D(-1337, -1337)) { + // calc for oversized windows... fucking bullshit. + wlr_box geom; + wlr_xdg_surface_get_geometry(pFoundWindow->m_uSurface.xdg, &geom); + + surfaceLocal = mouseCoords - surfacePos + Vector2D(geom.x, geom.y); + } + if (pFoundWindow) { static auto *const PFOLLOWMOUSE = &g_pConfigManager->getConfigValuePtr("input:follow_mouse")->intValue; if (*PFOLLOWMOUSE != 1 && !refocus) { |
