diff --git a/spnavd.c b/spnavd.c index ab0b2a8..921a486 100644 --- a/spnavd.c +++ b/spnavd.c @@ -1045,7 +1045,9 @@ void sig_handler(int s) fprintf(stderr, "Segmentation fault caught, trying to exit gracefully\n"); case SIGINT: case SIGTERM: +#ifdef USE_X11 close_x11(); /* call to avoid leaving garbage in the X server's root windows */ +#endif close_dev(); remove(PIDFILE); exit(0);