Simply coords_in_box()

This commit is contained in:
Leon Plickat 2019-11-25 13:12:06 +01:00
parent 425ae0f698
commit 216e462841
1 changed files with 2 additions and 5 deletions

View File

@ -40,15 +40,12 @@ index 0cc1293..27c51ce 100644
}
void key_press(XEvent *e) {
@@ -172,12 +171,32 @@ void win_kill() {
@@ -172,12 +171,29 @@ void win_kill() {
if (cur) XKillClient(d, cur->w);
}
+int coords_in_box (int x, int y, int box_x, int box_y, int box_w, int box_h) {
+ if ((x >= box_x && x < box_x + box_w) && (y >= box_y && y < box_y + box_h))
+ return 1;
+ else
+ return 0;
+ return ((x >= box_x && x < box_x + box_w) && (y >= box_y && y < box_y + box_h));
+}
+
void win_center() {