move some netatom back but only in setup()

This commit is contained in:
Julien Danjou 2007-09-10 16:55:33 +02:00
parent c95c4173a6
commit fc686750eb
4 changed files with 7 additions and 8 deletions

View File

@ -19,7 +19,6 @@
#include "tag.h" #include "tag.h"
int wax, way, waw, wah; int wax, way, waw, wah;
Atom netatom[NetLast];
Client *clients = NULL; Client *clients = NULL;
Client *sel = NULL; Client *sel = NULL;
Client *stack = NULL; Client *stack = NULL;
@ -137,6 +136,8 @@ scan(Display *disp, awesome_config *awesomeconf)
XFree(wins); XFree(wins);
} }
/** Setup everything before running /** Setup everything before running
* \param disp Display ref * \param disp Display ref
* \param awesomeconf awesome config ref * \param awesomeconf awesome config ref
@ -146,11 +147,13 @@ static void
setup(Display *disp, awesome_config *awesomeconf) setup(Display *disp, awesome_config *awesomeconf)
{ {
XSetWindowAttributes wa; XSetWindowAttributes wa;
enum { NetSupported, NetWMName, NetLast }; /* EWMH atoms */
Atom netatom[NetWMName];
/* init atoms */
netatom[NetSupported] = XInternAtom(disp, "_NET_SUPPORTED", False); netatom[NetSupported] = XInternAtom(disp, "_NET_SUPPORTED", False);
XChangeProperty(disp, DefaultRootWindow(disp), netatom[NetSupported], XA_ATOM, 32, netatom[NetWMName] = XInternAtom(disp, "_NET_WM_NAME", False);
PropModeReplace, (unsigned char *) netatom, NetLast); XChangeProperty(disp, DefaultRootWindow(disp), XInternAtom(disp, "_NET_SUPPORTED", False),
XA_ATOM, 32, PropModeReplace, (unsigned char *) netatom, NetLast);
/* init cursors */ /* init cursors */
cursor[CurNormal] = XCreateFontCursor(disp, XC_left_ptr); cursor[CurNormal] = XCreateFontCursor(disp, XC_left_ptr);
cursor[CurResize] = XCreateFontCursor(disp, XC_sizing); cursor[CurResize] = XCreateFontCursor(disp, XC_sizing);

View File

@ -36,8 +36,6 @@
enum enum
{ CurNormal, CurResize, CurMove, CurLast }; /* cursor */ { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
enum
{ NetSupported, NetLast }; /* EWMH atoms */
Bool gettextprop(Display *, Window, Atom, char *, unsigned int); /* return text property, UTF-8 compliant */ Bool gettextprop(Display *, Window, Atom, char *, unsigned int); /* return text property, UTF-8 compliant */
void updatebarpos(Display *, Statusbar); /* updates the bar position */ void updatebarpos(Display *, Statusbar); /* updates the bar position */

View File

@ -15,7 +15,6 @@
/* extern */ /* extern */
extern int wax, way, wah, waw; /* windowarea geometry */ extern int wax, way, wah, waw; /* windowarea geometry */
extern Client *clients, *sel, *stack; /* global client list and stack */ extern Client *clients, *sel, *stack; /* global client list and stack */
extern Atom netatom[NetLast];
/** Attach client stack to clients stacks /** Attach client stack to clients stacks
* \param c the client * \param c the client

View File

@ -17,7 +17,6 @@ extern int wax, way, wah, waw; /* windowarea geometry */
extern DC dc; /* global draw context */ extern DC dc; /* global draw context */
extern Cursor cursor[CurLast]; extern Cursor cursor[CurLast];
extern Client *clients, *sel; /* global client list */ extern Client *clients, *sel; /* global client list */
extern Atom netatom[NetLast];
#define CLEANMASK(mask) (mask & ~(awesomeconf->numlockmask | LockMask)) #define CLEANMASK(mask) (mask & ~(awesomeconf->numlockmask | LockMask))
#define MOUSEMASK (BUTTONMASK | PointerMotionMask) #define MOUSEMASK (BUTTONMASK | PointerMotionMask)