From 9f04d824b78fb39d03d00dfc68860216857c7d97 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Sun, 21 Aug 2022 14:57:39 +0100 Subject: [PATCH] Rename COMPTON_VERSION to PICOM_VERSION Signed-off-by: Yuxuan Shui --- meson.build | 2 +- src/dbus.c | 2 +- src/diagnostic.c | 2 +- src/options.c | 4 ++-- src/picom.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index e333c317..0150a37c 100644 --- a/meson.build +++ b/meson.build @@ -15,7 +15,7 @@ if git.found() endif endif -add_global_arguments('-DCOMPTON_VERSION="'+version+'"', language: 'c') +add_global_arguments('-DPICOM_VERSION="'+version+'"', language: 'c') if get_option('buildtype') == 'release' add_global_arguments('-DNDEBUG', language: 'c') diff --git a/src/dbus.c b/src/dbus.c index e0371671..8b17b30d 100644 --- a/src/dbus.c +++ b/src/dbus.c @@ -1153,7 +1153,7 @@ static bool cdbus_process_opts_get(session_t *ps, DBusMessage *msg) { // version if (!strcmp("version", target)) { - cdbus_reply_string(ps, msg, COMPTON_VERSION); + cdbus_reply_string(ps, msg, PICOM_VERSION); return true; } diff --git a/src/diagnostic.c b/src/diagnostic.c index d275b1a1..79ac5ac8 100644 --- a/src/diagnostic.c +++ b/src/diagnostic.c @@ -12,7 +12,7 @@ #include "common.h" void print_diagnostics(session_t *ps, const char *config_file, bool compositor_running) { - printf("**Version:** " COMPTON_VERSION "\n"); + printf("**Version:** " PICOM_VERSION "\n"); //printf("**CFLAGS:** %s\n", "??"); printf("\n### Extensions:\n\n"); printf("* Shape: %s\n", ps->shape_exists ? "Yes" : "No"); diff --git a/src/options.c b/src/options.c index 9f6888ff..9ec6e81b 100644 --- a/src/options.c +++ b/src/options.c @@ -26,7 +26,7 @@ static void usage(const char *argv0, int ret) { #define WARNING_DISABLED " (DISABLED AT COMPILE TIME)" static const char *usage_text = - "picom (" COMPTON_VERSION ")\n" + "picom (" PICOM_VERSION ")\n" "Please report bugs to https://github.com/yshui/picom\n\n" "usage: %s [options]\n" "Options:\n" @@ -495,7 +495,7 @@ bool get_early_config(int argc, char *const *argv, char **config_file, bool *all } else if (o == 314) { *all_xerrors = true; } else if (o == 318) { - printf("%s\n", COMPTON_VERSION); + printf("%s\n", PICOM_VERSION); return true; } else if (o == '?' || o == ':') { usage(argv[0], 1); diff --git a/src/picom.c b/src/picom.c index e4a56077..fd693fc9 100644 --- a/src/picom.c +++ b/src/picom.c @@ -1092,7 +1092,7 @@ static int register_cm(session_t *ps) { ps->c, xcb_change_property_checked( ps->c, XCB_PROP_MODE_REPLACE, ps->reg_win, get_atom(ps->atoms, "COMPTON_VERSION"), XCB_ATOM_STRING, 8, - (uint32_t)strlen(COMPTON_VERSION), COMPTON_VERSION)); + (uint32_t)strlen(PICOM_VERSION), PICOM_VERSION)); if (e) { log_error_x_error(e, "Failed to set COMPTON_VERSION."); free(e);