summaryrefslogtreecommitdiff
path: root/Tests/X11
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-11-04 11:54:30 -0500
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-11-04 11:54:30 -0500
commit23dde130c7ffd210a91ee07871ee56a5ebe25440 (patch)
tree59df379257554c89ca39fa86bd79fddeaf549ef6 /Tests/X11
parent7f0cbaa5eefde84f28ebe03c95a85765ca987093 (diff)
downloadcmake-23dde130c7ffd210a91ee07871ee56a5ebe25440.tar.gz
Fix test
Diffstat (limited to 'Tests/X11')
-rw-r--r--Tests/X11/X11.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/Tests/X11/X11.c b/Tests/X11/X11.c
index bac0836c4e..8ec6adc0d5 100644
--- a/Tests/X11/X11.c
+++ b/Tests/X11/X11.c
@@ -23,20 +23,20 @@ char **argv;
int i;
char text[10];
int done;
+ char* display = ":0";
- mydisplay=XOpenDisplay("");
-/*
- myscreen=DefaultScreen(mydisplay);
- myforeground=BlackPixel(mydisplay, myscreen);
-
- mywindow=XCreateSimpleWindow(mydisplay,
- DefaultRootWindow(mydisplay),
- myhint.x, myhint.y, myhint.width,
- myhint.height, 5,
- myforeground, mybackground );
- XDestroyWindow(mydisplay, mywindow);
-*/
- XCloseDisplay(mydisplay);
+
+ if ( getenv("DISPLAY") )
+ {
+ display = getenv("DISPLAY");
+ }
+
+ mydisplay=XOpenDisplay(display);
+ if ( mydisplay )
+ {
+ printf("Opened...\n");
+ XCloseDisplay(mydisplay);
+ }
exit(0);
}