Mercurial > x11calc
diff x11.cpp @ 0:12567e0a7670 default tip
initial commit
| author | Yasuri <yasuri@charliesmp.net> |
|---|---|
| date | Sun, 04 Oct 2026 12:56:43 -0500 |
| parents | |
| children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/x11.cpp Sun Oct 04 12:56:43 2026 -0500 @@ -0,0 +1,13 @@ +#include <X11/Xlib.h> +#include <iostream> +#include <cstdlib> +#include "x11.h" +Display *displayopen() +{ + Display* dpy = XOpenDisplay(NULL); + if (dpy == NULL) { + std::cerr << "Could not open display\n"; + std::exit(1); + } + return dpy; +}
