]> git.sur5r.net Git - i3/i3/blobdiff - src/util.c
Bugfix: don’t overwrite the original size of floating windows when changing border...
[i3/i3] / src / util.c
index de36d4aaecf4e88f18023687eeaafaa6b0c2e18c..d8fb30fe99b55a72cc45e6349aed837b97509d05 100644 (file)
@@ -48,6 +48,13 @@ Rect rect_add(Rect a, Rect b) {
                   a.height + b.height};
 }
 
+Rect rect_sub(Rect a, Rect b) {
+    return (Rect){a.x - b.x,
+                  a.y - b.y,
+                  a.width - b.width,
+                  a.height - b.height};
+}
+
 /*
  * Returns true if the name consists of only digits.
  *