From 216e46284198dbb47436e4fa90f2522778153ef0 Mon Sep 17 00:00:00 2001 From: Leon Plickat Date: Mon, 25 Nov 2019 13:12:06 +0100 Subject: [PATCH] Simply coords_in_box() --- patches/sowm-primitive-multimonitor.patch | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/patches/sowm-primitive-multimonitor.patch b/patches/sowm-primitive-multimonitor.patch index 86a91a1..ed4b909 100644 --- a/patches/sowm-primitive-multimonitor.patch +++ b/patches/sowm-primitive-multimonitor.patch @@ -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() {