From ad36a9dc9ed032e6e34c06f78995bca0045f85b0 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sun, 27 Mar 2022 17:25:20 +0200 Subject: rework popups completely --- src/defines.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/defines.hpp') diff --git a/src/defines.hpp b/src/defines.hpp index 0be79cb6..ff7588e0 100644 --- a/src/defines.hpp +++ b/src/defines.hpp @@ -1,4 +1,5 @@ #include "includes.hpp" +#include "debug/Log.hpp" #ifndef NDEBUG #define ISDEBUG true @@ -10,6 +11,7 @@ #define LISTENER(name) void listener_##name(wl_listener*, void*); inline wl_listener listen_##name = { .notify = listener_##name }; #define DYNLISTENER(name) wl_listener listen_##name = { .notify = Events::listener_##name }; +#define DYNMULTILISTENER(name) wl_listener listen_##name; #define VECINRECT(vec, x1, y1, x2, y2) (vec.x >= (x1) && vec.x <= (x2) && vec.y >= (y1) && vec.y <= (y2)) @@ -22,4 +24,8 @@ #define GREEN(c) ((double)(((c) >> 8) & 0xff) / 255.0) #define BLUE(c) ((double)(((c)) & 0xff) / 255.0) -#define HYPRATOM(name) {name, 0} \ No newline at end of file +#define HYPRATOM(name) {name, 0} + +#define RASSERT(expr, reason) if (expr) { Debug::log(CRIT, "\n==========================================================================================\nASSERTION FAILED! \n\n%s\n\nat: line %s in %s", reason, __LINE__, __FILE__); RIP("Assertion failed! See the log in /tmp/hypr/hyprland.log for more info.");} + +#define ASSERT(expr) RASSERT(expr, "?") \ No newline at end of file -- cgit v1.2.3