diff options
author | daniel-Jones <daniel@danieljon.es> | 2018-09-20 12:55:58 +0930 |
---|---|---|
committer | daniel-Jones <daniel@danieljon.es> | 2018-09-20 12:55:58 +0930 |
commit | 3993e2dd0645064fafc4f6206e90390524d99b57 (patch) | |
tree | 544627a058047c54ac69ba2809b6922cf159e043 | |
parent | 2000b4f849c0407f8955ba217d4d425a4da54171 (diff) | |
download | binstatus-3993e2dd0645064fafc4f6206e90390524d99b57.tar.gz binstatus-3993e2dd0645064fafc4f6206e90390524d99b57.zip |
that isn't how you handle errors in x11
-rw-r--r-- | binstatus.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/binstatus.c b/binstatus.c index ca384f1..615b584 100644 --- a/binstatus.c +++ b/binstatus.c @@ -81,20 +81,7 @@ main(int argc, char *argv[]) { gettime(time); formatstring(status, time); - int res = XStoreName(dsp, DefaultRootWindow(dsp), status); - if (res == BadAlloc) - { - fprintf(stderr, "X: unable to allocate source" - " or server memory.\n"); - exitflag = EXIT_FAILURE; - break; - } - else if (res == BadWindow) - { - fprintf(stderr, "X: No default window found\n"); - exitflag = EXIT_FAILURE; - break; - } + XStoreName(dsp, DefaultRootWindow(dsp), status); XFlush(dsp); sleep(1); } |