summaryrefslogtreecommitdiff
path: root/src/helpers/Region.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/helpers/Region.cpp')
-rw-r--r--src/helpers/Region.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/helpers/Region.cpp b/src/helpers/Region.cpp
index 3a210d06..e510e3d3 100644
--- a/src/helpers/Region.cpp
+++ b/src/helpers/Region.cpp
@@ -18,6 +18,10 @@ CRegion::CRegion(wlr_box* box) {
pixman_region32_init_rect(&m_rRegion, box->x, box->y, box->width, box->height);
}
+CRegion::CRegion(pixman_box32_t* box) {
+ pixman_region32_init_rect(&m_rRegion, box->x1, box->y1, box->x2 - box->x1, box->y2 - box->y1);
+}
+
CRegion::CRegion(const CRegion& other) {
pixman_region32_init(&m_rRegion);
pixman_region32_copy(&m_rRegion, const_cast<CRegion*>(&other)->pixman());