Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/commands/helpers/xephyr-window.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/helpers/xephyr-window.c')
-rwxr-xr-xcommands/helpers/xephyr-window.c58
1 files changed, 0 insertions, 58 deletions
diff --git a/commands/helpers/xephyr-window.c b/commands/helpers/xephyr-window.c
deleted file mode 100755
index b711f99..0000000
--- a/commands/helpers/xephyr-window.c
+++ /dev/null
@@ -1,58 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <X11/Xlib.h>
-#include <X11/Xatom.h>
-
-int main(int argc, char **argv)
-{
- Display *display = XOpenDisplay(NULL);
- Window window, root_window;
- Atom atom;
- int width = 100, height = 100;
-
- if (argc > 1) {
- char *geometry = strdup(argv[1]);
- char *delimiter = strchr(geometry, 'x');
-
- if (delimiter == NULL) {
- fprintf(stderr, "Cannot parse geometry\n");
- free(geometry);
- exit(1);
- }
-
- *delimiter = '\0';
- width = atoi(geometry);
- height = atoi(delimiter + 1);
-
- free(geometry);
- }
-
- root_window = RootWindow(display, 0);
-
- window = XCreateSimpleWindow(display, root_window, 0, 0,
- width, height, 0, 0, 0);
-
- printf("%d\n", window);
- fflush(stdout);
-
- if (argc < 2) {
- atom = XInternAtom(display, "_NET_WM_STATE_FULLSCREEN", True);
- XChangeProperty(display, window,
- XInternAtom(display, "_NET_WM_STATE", True),
- XA_ATOM, 32, PropModeReplace,
- (unsigned char *)&atom, 1);
- }
-
- XMapWindow(display, window);
-
- XFlush(display);
-
- while(1) {
- sleep(60);
- }
-
- XCloseDisplay(display);
-
- return(0);
-}