internal: Move CMonitor to SP (#8178)

* move monitors to sp

* XD
This commit is contained in:
Vaxry 2024-10-19 23:03:29 +01:00 committed by GitHub
parent ce3ba798df
commit f044e4c951
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
66 changed files with 424 additions and 446 deletions

View file

@ -100,11 +100,11 @@ void CInputPopup::updateBox() {
cursorBoxParent = {0, 0, (int)parentBox.w, (int)parentBox.h};
}
Vector2D currentPopupSize = surface->getViewporterCorrectedSize() / surface->resource()->current.scale;
Vector2D currentPopupSize = surface->getViewporterCorrectedSize() / surface->resource()->current.scale;
CMonitor* pMonitor = g_pCompositor->getMonitorFromVector(parentBox.middle());
PHLMONITOR pMonitor = g_pCompositor->getMonitorFromVector(parentBox.middle());
Vector2D popupOffset(0, 0);
Vector2D popupOffset(0, 0);
if (parentBox.y + cursorBoxParent.y + cursorBoxParent.height + currentPopupSize.y > pMonitor->vecPosition.y + pMonitor->vecSize.y)
popupOffset.y -= currentPopupSize.y;