mirror of
https://github.com/dylanaraps/sowm.git
synced 2025-05-19 09:30:24 -07:00
Remove dependency on stdbool.h
This commit is contained in:
parent
818480983f
commit
8f1b7c28df
@ -13,7 +13,7 @@ diff --git a/sowm.c b/sowm.c
|
|||||||
index 0cc1293..27c51ce 100644
|
index 0cc1293..27c51ce 100644
|
||||||
--- a/sowm.c
|
--- a/sowm.c
|
||||||
+++ b/sowm.c
|
+++ b/sowm.c
|
||||||
@@ -4,9 +4,11 @@
|
@@ -4,9 +4,10 @@
|
||||||
#include <X11/XF86keysym.h>
|
#include <X11/XF86keysym.h>
|
||||||
#include <X11/keysym.h>
|
#include <X11/keysym.h>
|
||||||
#include <X11/XKBlib.h>
|
#include <X11/XKBlib.h>
|
||||||
@ -21,7 +21,6 @@ index 0cc1293..27c51ce 100644
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
+#include <stdbool.h>
|
|
||||||
|
|
||||||
typedef union {
|
typedef union {
|
||||||
const char** com;
|
const char** com;
|
||||||
@ -45,11 +44,11 @@ index 0cc1293..27c51ce 100644
|
|||||||
if (cur) XKillClient(d, cur->w);
|
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))
|
+ if ((x >= box_x && x < box_x + box_w) && (y >= box_y && y < box_y + box_h))
|
||||||
+ return true;
|
+ return 1;
|
||||||
+ else
|
+ else
|
||||||
+ return false;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
void win_center() {
|
void win_center() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user