summaryrefslogtreecommitdiff
path: root/tests/openclosedisplay.c
blob: 4b50ce1a8995273ea421ae8bf2341c32dca3fbf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <X11/Xlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(void) {
	Display *d;

	d = XOpenDisplay(NULL);
	if (d == NULL) {
		printf("Cannot open display\n");
		exit(1);
	}

	XCloseDisplay(d);
	printf("ok\n");
	return 0;
}