summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-11-04 16:54:30 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-11-04 16:54:30 (GMT)
commit23dde130c7ffd210a91ee07871ee56a5ebe25440 (patch)
tree59df379257554c89ca39fa86bd79fddeaf549ef6 /Tests
parent7f0cbaa5eefde84f28ebe03c95a85765ca987093 (diff)
downloadCMake-23dde130c7ffd210a91ee07871ee56a5ebe25440.zip
CMake-23dde130c7ffd210a91ee07871ee56a5ebe25440.tar.gz
CMake-23dde130c7ffd210a91ee07871ee56a5ebe25440.tar.bz2
Fix test
Diffstat (limited to 'Tests')
-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 bac0836..8ec6adc 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);
}