diff --git a/awesome.c b/awesome.c index f8242c17d..503e53875 100644 --- a/awesome.c +++ b/awesome.c @@ -19,7 +19,6 @@ #include "tag.h" int wax, way, waw, wah; -Atom netatom[NetLast]; Client *clients = NULL; Client *sel = NULL; Client *stack = NULL; @@ -137,6 +136,8 @@ scan(Display *disp, awesome_config *awesomeconf) XFree(wins); } + + /** Setup everything before running * \param disp Display ref * \param awesomeconf awesome config ref @@ -146,11 +147,13 @@ static void setup(Display *disp, awesome_config *awesomeconf) { XSetWindowAttributes wa; + enum { NetSupported, NetWMName, NetLast }; /* EWMH atoms */ + Atom netatom[NetWMName]; - /* init atoms */ netatom[NetSupported] = XInternAtom(disp, "_NET_SUPPORTED", False); - XChangeProperty(disp, DefaultRootWindow(disp), netatom[NetSupported], XA_ATOM, 32, - PropModeReplace, (unsigned char *) netatom, NetLast); + netatom[NetWMName] = XInternAtom(disp, "_NET_WM_NAME", False); + XChangeProperty(disp, DefaultRootWindow(disp), XInternAtom(disp, "_NET_SUPPORTED", False), + XA_ATOM, 32, PropModeReplace, (unsigned char *) netatom, NetLast); /* init cursors */ cursor[CurNormal] = XCreateFontCursor(disp, XC_left_ptr); cursor[CurResize] = XCreateFontCursor(disp, XC_sizing); diff --git a/awesome.h b/awesome.h index ff99f353a..bd3276c7b 100644 --- a/awesome.h +++ b/awesome.h @@ -36,8 +36,6 @@ enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ -enum -{ NetSupported, NetLast }; /* EWMH atoms */ Bool gettextprop(Display *, Window, Atom, char *, unsigned int); /* return text property, UTF-8 compliant */ void updatebarpos(Display *, Statusbar); /* updates the bar position */ diff --git a/client.c b/client.c index efea60333..5c217b56e 100644 --- a/client.c +++ b/client.c @@ -15,7 +15,6 @@ /* extern */ extern int wax, way, wah, waw; /* windowarea geometry */ extern Client *clients, *sel, *stack; /* global client list and stack */ -extern Atom netatom[NetLast]; /** Attach client stack to clients stacks * \param c the client diff --git a/event.c b/event.c index 33d4eace6..13f68a022 100644 --- a/event.c +++ b/event.c @@ -17,7 +17,6 @@ extern int wax, way, wah, waw; /* windowarea geometry */ extern DC dc; /* global draw context */ extern Cursor cursor[CurLast]; extern Client *clients, *sel; /* global client list */ -extern Atom netatom[NetLast]; #define CLEANMASK(mask) (mask & ~(awesomeconf->numlockmask | LockMask)) #define MOUSEMASK (BUTTONMASK | PointerMotionMask)