xorg fix error reporting.

This commit is contained in:
m1k1o 2021-04-12 19:42:58 +02:00
parent b13b1907f4
commit 4320a2b299

View File

@ -39,8 +39,8 @@ KeyCode XKeysPop(KeySym keysym) {
previous = node;
node = node->next;
if (i++ > 120) {
// this should lead to a panic
printf("loop over limit");
// this should NEVER HAPPEN
fprintf(stderr, "[FATAL-ERROR] XKeysPop() in xorg.c: reached maximum loop limit! Something is wrong\n");
break;
}
}
@ -65,7 +65,7 @@ Display *getXDisplay(void) {
}
if (DISPLAY == NULL) {
fputs("Could not open main display\n", stderr);
fprintf(stderr, "[FATAL-ERROR] XKeysPop() in xorg.c: Could not open main display!");
} else if (!REGISTERED) {
atexit(&XDisplayClose);
REGISTERED = 1;