mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-03 06:46:38 -04:00
fix : ensure the current dekstop is mango before executing ipc dispatch
This commit is contained in:
parent
7cfeeb3687
commit
11f6f8d63a
1 changed files with 9 additions and 0 deletions
|
|
@ -546,6 +546,15 @@ static void usage(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t main(int32_t argc, char *argv[]) {
|
int32_t main(int32_t argc, char *argv[]) {
|
||||||
|
|
||||||
|
const char *env_XDG_DEKSTOP = getenv("XDG_CURRENT_DESKTOP");
|
||||||
|
|
||||||
|
if (!env_XDG_DEKSTOP || strcmp(env_XDG_DEKSTOP, "mango")) {
|
||||||
|
fprintf(stderr, "wrong dekstop, wanted 'mango' have '%s'\n",
|
||||||
|
env_XDG_DEKSTOP);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
ARGBEGIN {
|
ARGBEGIN {
|
||||||
case 'q':
|
case 'q':
|
||||||
qflag = 1;
|
qflag = 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue