Internal: Hyprland box implementation (#3755)

* box impl

* remove unused operators

* missed applyfromwlr
This commit is contained in:
Vaxry 2023-11-04 17:03:05 +00:00 committed by GitHub
parent 73e78f05ad
commit 55b4f84fea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
47 changed files with 520 additions and 352 deletions

View file

@ -98,8 +98,9 @@ void SubsurfaceTree::destroySurfaceTree(SSurfaceTreeNode* pNode) {
// damage
if (pNode->pSurface && pNode->pSurface->exists()) {
wlr_box extents = {};
wlr_surface_get_extends(pNode->pSurface->wlr(), &extents);
CBox extents = {};
wlr_surface_get_extends(pNode->pSurface->wlr(), extents.pWlr());
extents.applyFromWlr();
int lx = 0, ly = 0;
addSurfaceGlobalOffset(pNode, &lx, &ly);
@ -198,7 +199,7 @@ void Events::listener_unmapSubsurface(void* owner, void* data) {
int lx = 0, ly = 0;
addSurfaceGlobalOffset(PNODE, &lx, &ly);
wlr_box extents = {lx, ly, 0, 0};
CBox extents = {lx, ly, 0, 0};
extents.width = PNODE->pSurface->wlr()->current.width;
extents.height = PNODE->pSurface->wlr()->current.height;