Remove dependency on stdbool.h

This commit is contained in:
Leon Plickat 2019-11-25 09:50:53 +01:00
parent 818480983f
commit 8f1b7c28df
1 changed files with 4 additions and 5 deletions

View File

@ -13,7 +13,7 @@ diff --git a/sowm.c b/sowm.c
index 0cc1293..27c51ce 100644
--- a/sowm.c
+++ b/sowm.c
@@ -4,9 +4,11 @@
@@ -4,9 +4,10 @@
#include <X11/XF86keysym.h>
#include <X11/keysym.h>
#include <X11/XKBlib.h>
@ -21,7 +21,6 @@ index 0cc1293..27c51ce 100644
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
+#include <stdbool.h>
typedef union {
const char** com;
@ -45,11 +44,11 @@ index 0cc1293..27c51ce 100644
if (cur) XKillClient(d, cur->w);
}
+bool coords_in_box (int x, int y, int box_x, int box_y, int box_w, int box_h) {
+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 true;
+ return 1;
+ else
+ return false;
+ return 0;
+}
+
void win_center() {