refactor: utilize 'middle()' method for window/montior center (#3253)

This commit is contained in:
memchr
2023-09-11 09:09:34 +00:00
committed by GitHub
parent 3859607b6c
commit e96e0dc02d
7 changed files with 20 additions and 23 deletions

View File

@@ -629,3 +629,7 @@ void CMonitor::moveTo(const Vector2D& pos) {
if (!isMirror())
wlr_output_layout_add(g_pCompositor->m_sWLROutputLayout, output, (int)vecPosition.x, (int)vecPosition.y);
}
Vector2D CMonitor::middle() {
return vecPosition + vecSize / 2.f;
}