diff options
-rw-r--r-- | src/syscheck.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/syscheck.c b/src/syscheck.c index 057356b..c13f7fa 100644 --- a/src/syscheck.c +++ b/src/syscheck.c @@ -37,6 +37,26 @@ #define TRUE 1 #define FALSE 0 +static Bool findCompiz () +{ + pid_t p = fork (); + if (p) + { + int stat; + + waitpid (p, &stat, 0); + + if (WEXITSTATUS(stat)) + return FALSE; + else + return TRUE; + } + else + { + execlp("compiz", "compiz", "--version", (char *)NULL); + exit(1); + } +} static Bool detect_nvidia(Display *dpy) { @@ -317,6 +337,13 @@ static int startCheck(char * displayName, int *mode, int *numScreens) return CHECK_ERROR; } + fprintf(stderr, "\nChecking for compiz : "); + if (!findCompiz()) + { + fprintf(stderr, "FAILED\n"); + return CHECK_ERROR; + } + if (mode) { *mode = MODE_AIGLX; |