diff options
author | uint23 <[email protected]> | 2025-04-18 22:08:23 +0100 |
---|---|---|
committer | uint23 <[email protected]> | 2025-04-18 22:08:23 +0100 |
commit | b48471170819d6c23c3ef0eaaa3414c1dbf4908c (patch) | |
tree | e48e2615fe50f00ef4e7772b206f7c39498150b3 /src/defs.h | |
parent | 75d7cd191653558f015a71ab33e3b68c889138f4 (diff) |
fixed snapping + config docs improved
Diffstat (limited to 'src/defs.h')
-rw-r--r-- | src/defs.h | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -13,18 +13,12 @@ #define SHIFT ShiftMask #define LENGTH(X) (sizeof X / sizeof X[0]) -#define BIND(mod, key, cmdstr) { (mod), XK_##key, { cmdstr }, 0 } +#define BIND(mod, key, cmdstr) { (mod), XK_##key, { cmdstr }, 0 } #define CALL(mod, key, fnptr) { (mod), XK_##key, { .fn = fnptr }, 1 } +#define CMD(name, ...) \ + static const char *name[] = { __VA_ARGS__, NULL } #define UDIST(a,b) abs((int)(a) - (int)(b)) -#define SNAP_EDGE(pos, size, bound) \ - do { \ - if (UDIST(pos, 0) < SNAP_DISTANCE) \ - pos = 0; \ - else if (UDIST(pos, (bound) - (size)) < SNAP_DISTANCE) \ - pos = (bound) - (size); \ - } while (0) - #define MAXCLIENTS 64 #define MAXGAPS 100 |