summaryrefslogtreecommitdiff
path: root/src/helpers/Region.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2023-11-04 17:03:05 +0000
committerGitHub <noreply@github.com>2023-11-04 17:03:05 +0000
commit55b4f84fea33adee3ec4b0a69c2bca6e7a1f5754 (patch)
treebe7db4f841b4ac049527daae01e683701bf92b92 /src/helpers/Region.cpp
parent73e78f05ad5cafa20ac5bf177c94ac9ecca37097 (diff)
Internal: Hyprland box implementation (#3755)
* box impl * remove unused operators * missed applyfromwlr
Diffstat (limited to 'src/helpers/Region.cpp')
-rw-r--r--src/helpers/Region.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/helpers/Region.cpp b/src/helpers/Region.cpp
index 5515e71e..fdf8a242 100644
--- a/src/helpers/Region.cpp
+++ b/src/helpers/Region.cpp
@@ -21,6 +21,10 @@ CRegion::CRegion(wlr_box* box) {
pixman_region32_init_rect(&m_rRegion, box->x, box->y, box->width, box->height);
}
+CRegion::CRegion(CBox* box) {
+ pixman_region32_init_rect(&m_rRegion, box->x, box->y, box->w, box->h);
+}
+
CRegion::CRegion(pixman_box32_t* box) {
pixman_region32_init_rect(&m_rRegion, box->x1, box->y1, box->x2 - box->x1, box->y2 - box->y1);
}
@@ -100,7 +104,7 @@ std::vector<pixman_box32_t> CRegion::getRects() const {
return result;
}
-wlr_box CRegion::getExtents() {
+CBox CRegion::getExtents() {
pixman_box32_t* box = pixman_region32_extents(&m_rRegion);
return {box->x1, box->y1, box->x2 - box->x1, box->y2 - box->y1};
}