X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2FUtil.cc;h=d80834447971b425750bd5ee44dc04665eac95f1;hb=47585423c6494391db0425f2237890e82f1b031a;hp=514774239c1b4de4f1c03c329f75c7c72c73c0f4;hpb=ffa4c7f3414944869016497a4f560c24b9d8b3e9;p=chaz%2Fopenbox diff --git a/src/Util.cc b/src/Util.cc index 51477423..d8083444 100644 --- a/src/Util.cc +++ b/src/Util.cc @@ -147,6 +147,12 @@ bool Rect::contains(int __x, int __y) const { } +bool Rect::contains(const Rect& a) const { + return a._x1 >= _x1 && a._x2 <= _x2 && + a._y1 >= _y1 && a._y2 <= _y2; +} + + string expandTilde(const string& s) { if (s[0] != '~') return s;