summaryrefslogtreecommitdiff
path: root/src/region.cpp
diff options
context:
space:
mode:
authorErkin Bahceci <erkinbah@gmail.com>2009-12-18 07:24:06 -0600
committerErkin Bahceci <erkinbah@gmail.com>2009-12-18 07:24:06 -0600
commitf8430b73b116ef2242151a84f3379ba60d2fbf64 (patch)
tree8c799f15cc3a2a230e5dcafd8e46dc55f51cce60 /src/region.cpp
parent5ce57a6682f936308e8c8769bac0c4c636c0b8ab (diff)
downloadunity-window-decorator-f8430b73b116ef2242151a84f3379ba60d2fbf64.tar.gz
unity-window-decorator-f8430b73b116ef2242151a84f3379ba60d2fbf64.tar.bz2
Add another contains method to CompRegion.
Diffstat (limited to 'src/region.cpp')
-rw-r--r--src/region.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/region.cpp b/src/region.cpp
index 44bee8c..334be13 100644
--- a/src/region.cpp
+++ b/src/region.cpp
@@ -140,6 +140,16 @@ CompRegion::contains (const CompRect &r) const
return result == RectangleIn;
}
+bool
+CompRegion::contains (int x, int y, int width, int height) const
+{
+ int result;
+
+ result = XRectInRegion (handle (), x, y, width, height);
+
+ return result == RectangleIn;
+}
+
CompRegion
CompRegion::intersected (const CompRegion &r) const
{