refactor: create include/common.h with shared types/macros, deduplicate across 7 files
This commit is contained in:
+1
-14
@@ -3,6 +3,7 @@
|
||||
#include <wlr/types/wlr_scene.h>
|
||||
#include "client.h"
|
||||
#include "monitor.h"
|
||||
#include "common.h"
|
||||
|
||||
/* Forward declarations from peachwm.c */
|
||||
extern struct wl_list clients;
|
||||
@@ -29,20 +30,6 @@ enum {
|
||||
/* NUM_LAYERS = 9 */
|
||||
};
|
||||
|
||||
/* The argument union used by keybind functions.
|
||||
* Both peachwm.c and the scratchpad module need to agree on this,
|
||||
* so it sits here rather than privately in each .c file. */
|
||||
typedef union {
|
||||
int i;
|
||||
uint32_t ui;
|
||||
float f;
|
||||
const void *v;
|
||||
} Arg;
|
||||
|
||||
/* Scoped visibility helper — also defined (identically) in layout.c */
|
||||
int visibleon(Client *c, Monitor *m);
|
||||
#define VISIBLEON(C, M) visibleon((C), (M))
|
||||
|
||||
/* ----------- Extracted scratchpad functions ----------- */
|
||||
|
||||
/* Reparent + resize every scratchpad client of @m to a centred 80% box */
|
||||
|
||||
Reference in New Issue
Block a user