blob: 9397854840305eed01331ec8a0f3a7265e14a393 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
http://bugs.gentoo.org/219754
--- src/main.c
+++ src/main.c
@@ -1853,15 +1853,13 @@
//get_options(argc, argv);
//display_options();
- if (display_name == NULL)
- if ((display_name = getenv("DISPLAY")) == NULL)
- display_name = ":0";
-
Xdisplay = XOpenDisplay(display_name);
if (!Xdisplay)
{
- print_error("can't open display %s", display_name);
+ print_error("can't open display %s", display_name?display_name:
+ getenv("DISPLAY")?getenv("DISPLAY"):
+ "as no -d given and DISPLAY not set");
exit(EXIT_FAILURE);
}
|