mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-02 17:05:58 +01:00
input: properly track xdg surfaces' geometry in vectorToSurfaceLocal
fixes #3703
This commit is contained in:
parent
f48b3774a2
commit
ab5497a0c9
1 changed files with 4 additions and 1 deletions
|
@ -865,10 +865,13 @@ Vector2D CCompositor::vectorToSurfaceLocal(const Vector2D& vec, CWindow* pWindow
|
|||
},
|
||||
&iterData);
|
||||
|
||||
wlr_box geom = {0};
|
||||
wlr_xdg_surface_get_geometry(PSURFACE, &geom);
|
||||
|
||||
if (std::get<1>(iterData) == -1337 && std::get<2>(iterData) == -1337)
|
||||
return vec - pWindow->m_vRealPosition.goalv();
|
||||
|
||||
return vec - pWindow->m_vRealPosition.goalv() - Vector2D{std::get<1>(iterData), std::get<2>(iterData)};
|
||||
return vec - pWindow->m_vRealPosition.goalv() - Vector2D{std::get<1>(iterData), std::get<2>(iterData)} + Vector2D{geom.x, geom.y};
|
||||
}
|
||||
|
||||
CMonitor* CCompositor::getMonitorFromOutput(wlr_output* out) {
|
||||
|
|
Loading…
Reference in a new issue