diff --git a/dwm.c b/dwm.c index b2e3d52..5da5b5e 100644 --- a/dwm.c +++ b/dwm.c @@ -310,17 +310,6 @@ checkotherwm(void) /* The other edge case is if the display just doesnt work, however this is covered at startup() if(!_wm.dpy) { DIE(msg); } */ } -uint8_t -checksticky(int64_t x) -{ - /* _NET_WM_DESKTOP - * https://specifications.freedesktop.org/wm-spec/latest/ - */ - return (x & 0xFFFFFFFF) | ((uint32_t)x == UINT32_MAX) | ((unsigned int)x == ~0) - /* probably not but failsafe's */ - | ((uint32_t)x == (uint32_t)~0) | ((int32_t)x == -1) | ((uint32_t)x == (uint32_t) -1); -} - void cleanup(void) { @@ -1413,7 +1402,8 @@ startup(void) { #ifdef __OpenBSD__ if (pledge("stdio rpath proc exec", NULL) == -1) - die("pledge"); + { DIECAT("pledge"); + } #endif /* __OpenBSD__ */ if(!setlocale(LC_CTYPE, "")) { fputs("WARN: NO_LOCALE_SUPPORT\n", stderr); @@ -1430,7 +1420,6 @@ startup(void) if(display) { setenv("DISPLAY", display, 1); } - /* keybinds hash */ atexit(exithandler); #ifndef DEBUG XCBSetErrorHandler(xerror); diff --git a/x.c b/x.c index e554c89..e02cb15 100644 --- a/x.c +++ b/x.c @@ -5,6 +5,17 @@ +uint8_t +checksticky(int64_t x) +{ + /* _NET_WM_DESKTOP + * https://specifications.freedesktop.org/wm-spec/latest/ + */ + return (x & 0xFFFFFFFF) | ((uint32_t)x == UINT32_MAX) | ((unsigned int)x == ~0) + /* probably not but failsafe's */ + | ((uint32_t)x == (uint32_t)~0) | ((int32_t)x == -1) | ((uint32_t)x == (uint32_t) -1); +} + void getnamefromreply(XCBWindowProperty *namerep, char **str_return) { diff --git a/x.h b/x.h index bdaab0b..bbfd0f9 100644 --- a/x.h +++ b/x.h @@ -16,7 +16,6 @@ * RETURN: 0 on False. */ uint8_t checksticky(int64_t x); - /* Allocates memory and resturns the pointer in **str_return from the specified XCBWindowProperty. */ void getnamefromreply(XCBWindowProperty *namerep, char **str_return); /* Gets the icon property from the specified XCBWindowProperty. */