use DefaultRootWindow macro

This commit is contained in:
Juan Ignacio Díaz 2022-09-20 12:31:23 -03:00
parent 6a97f4d0c5
commit 88048a74d1
1 changed files with 1 additions and 3 deletions

4
main.c
View File

@ -36,7 +36,6 @@ typedef const struct {
#endif
static Display *dpy;
static int screen;
static Window root;
static unsigned short statusContinue = 1;
static struct epoll_event event;
@ -166,8 +165,7 @@ int setupX() {
dpy = XOpenDisplay(NULL);
if (!dpy) return 1;
screen = DefaultScreen(dpy);
root = RootWindow(dpy, screen);
root = DefaultRootWindow(dpy);
return 0;
}