mirror of
https://github.com/dylanaraps/sowm.git
synced 2025-05-19 09:30:24 -07:00
sowm: remove root global
This commit is contained in:
parent
a4293a63a7
commit
b48c9b6add
9
sowm.c
9
sowm.c
@ -50,7 +50,6 @@ static int ws = 1, sw, sh, wx, wy;
|
|||||||
static unsigned int ww, wh;
|
static unsigned int ww, wh;
|
||||||
|
|
||||||
static Display *d;
|
static Display *d;
|
||||||
static Window root;
|
|
||||||
static XButtonEvent mouse;
|
static XButtonEvent mouse;
|
||||||
|
|
||||||
static void (*events[LASTEvent])(XEvent *e) = {
|
static void (*events[LASTEvent])(XEvent *e) = {
|
||||||
@ -275,10 +274,10 @@ int main(void) {
|
|||||||
signal(SIGCHLD, SIG_IGN);
|
signal(SIGCHLD, SIG_IGN);
|
||||||
XSetErrorHandler(xerror);
|
XSetErrorHandler(xerror);
|
||||||
|
|
||||||
int s = DefaultScreen(d);
|
int s = DefaultScreen(d);
|
||||||
root = RootWindow(d, s);
|
Window root = RootWindow(d, s);
|
||||||
sw = XDisplayWidth(d, s);
|
sw = XDisplayWidth(d, s);
|
||||||
sh = XDisplayHeight(d, s);
|
sh = XDisplayHeight(d, s);
|
||||||
|
|
||||||
XSelectInput(d, root, SubstructureRedirectMask);
|
XSelectInput(d, root, SubstructureRedirectMask);
|
||||||
XDefineCursor(d, root, XCreateFontCursor(d, 68));
|
XDefineCursor(d, root, XCreateFontCursor(d, 68));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user