comparison gbwm.c @ 17:7a779983be56

added missing library and removed unused code (refactor)
author Atarwn Gard <a@qwa.su>
date Wed, 15 Oct 2025 09:13:26 +0500
parents 9a4656899644
children
comparison
equal deleted inserted replaced
16:5e9111d1a285 17:7a779983be56
3 #include <X11/Xlib.h> 3 #include <X11/Xlib.h>
4 #include <X11/Xatom.h> 4 #include <X11/Xatom.h>
5 #include <X11/Xft/Xft.h> 5 #include <X11/Xft/Xft.h>
6 #include <X11/Xutil.h> 6 #include <X11/Xutil.h>
7 #include <X11/keysym.h> 7 #include <X11/keysym.h>
8 #include <X11/XF86keysym.h>
8 #include <X11/cursorfont.h> 9 #include <X11/cursorfont.h>
9 #include <X11/extensions/XTest.h> 10 #include <X11/extensions/XTest.h>
10 #include <stdio.h> 11 #include <stdio.h>
11 #include <stdlib.h> 12 #include <stdlib.h>
12 #include <stdarg.h> 13 #include <stdarg.h>
814 die("DISPLAY environment variable not set"); 815 die("DISPLAY environment variable not set");
815 if (!(dpy = XOpenDisplay(NULL))) 816 if (!(dpy = XOpenDisplay(NULL)))
816 die("cannot open X11 display (is X running?)"); 817 die("cannot open X11 display (is X running?)");
817 818
818 signal(SIGCHLD, sigchld); 819 signal(SIGCHLD, sigchld);
819 if (!(dpy = XOpenDisplay(NULL))) {
820 fprintf(stderr, "eowm: cannot open display\n");
821 exit(1);
822 }
823 XSetErrorHandler(xerror_handler); 820 XSetErrorHandler(xerror_handler);
824 821
825 sw = DisplayWidth(dpy, DefaultScreen(dpy)); 822 sw = DisplayWidth(dpy, DefaultScreen(dpy));
826 sh = DisplayHeight(dpy, DefaultScreen(dpy)); 823 sh = DisplayHeight(dpy, DefaultScreen(dpy));
827 root = RootWindow(dpy, DefaultScreen(dpy)); 824 root = RootWindow(dpy, DefaultScreen(dpy));