dpy = XOpenDisplay(displayName);
if (!dpy) {
- fprintf(stderr, "Unable to open display %s\n", displayName);
+ fprintf(stderr, "Unable to open display %s\n", XDisplayName(displayName));
return -1;
}
}
dpy = XOpenDisplay(dpyName);
if (!dpy) {
- printf("Error: couldn't open display %s\n",
- dpyName ? dpyName : getenv("DISPLAY"));
+ fprintf(stderr, "Error: couldn't open display %s\n",
+ XDisplayName(dpyName));
return -1;
}
dpy = XOpenDisplay(dpyName);
if (!dpy) {
- printf("Error: couldn't open display %s\n", dpyName);
+ printf("Error: couldn't open display %s\n", XDisplayName(dpyName));
return -1;
}
static void
Error(const char *display, const char *msg)
{
- fprintf(stderr, "Error on display %s - %s\n", display, msg);
+ fprintf(stderr, "Error on display %s - %s\n", XDisplayName(display), msg);
exit(1);
}
dpy = XOpenDisplay(displayName);
if (!dpy) {
- fprintf(stderr, "Error: unable to open display %s\n", displayName);
+ fprintf(stderr, "Error: unable to open display %s\n", XDisplayName(displayName));
return -1;
}
dpy = XOpenDisplay(dpyName);
if (!dpy) {
- printf("Error: couldn't open display %s\n", dpyName);
+ printf("Error: couldn't open display %s\n", XDisplayName(dpyName));
return -1;
}
static void
Error(const char *display, const char *msg)
{
- fprintf(stderr, "Error on display %s - %s\n", display, msg);
+ fprintf(stderr, "Error on display %s - %s\n", XDisplayName(display), msg);
exit(1);
}
dpy = XOpenDisplay(dpyName);
if (!dpy) {
- printf("Error: couldn't open display %s\n", dpyName);
+ printf("Error: couldn't open display %s\n", XDisplayName(dpyName));
exit(1);
}
dpy = XOpenDisplay(dpyName);
if (!dpy) {
- printf("Error: couldn't open display %s\n", dpyName ? dpyName : ":0");
+ printf("Error: couldn't open display %s\n", XDisplayName(dpyName));
return 1;
}
dpy = XOpenDisplay(dpyName);
if (!dpy) {
printf("Error: couldn't open display %s\n",
- dpyName ? dpyName : getenv("DISPLAY"));
+ XDisplayName(dpyName));
return -1;
}