Move atom "UTF8_STRING" to atoms module
This commit is contained in:
parent
0312e3a85d
commit
ec0402f958
3 changed files with 4 additions and 4 deletions
2
atoms.c
2
atoms.c
|
@ -32,6 +32,8 @@ Atoms atoms_create(Display *const dpy)
|
|||
atoms->xatom[Xembed] = XInternAtom(dpy, "_XEMBED", False);
|
||||
atoms->xatom[XembedInfo] = XInternAtom(dpy, "_XEMBED_INFO", False);
|
||||
|
||||
atoms->utf8string = XInternAtom(dpy, "UTF8_STRING", False);
|
||||
|
||||
return atoms;
|
||||
}
|
||||
|
||||
|
|
2
atoms.h
2
atoms.h
|
@ -18,7 +18,7 @@ enum { Manager, Xembed, XembedInfo, XLast };
|
|||
enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast };
|
||||
|
||||
typedef struct Atoms {
|
||||
Atom wmatom[WMLast], netatom[NetLast], xatom[XLast];
|
||||
Atom wmatom[WMLast], netatom[NetLast], xatom[XLast], utf8string;
|
||||
} *Atoms;
|
||||
|
||||
Atoms atoms_create(Display *dpy);
|
||||
|
|
4
dwm.c
4
dwm.c
|
@ -1829,7 +1829,6 @@ setup(void)
|
|||
{
|
||||
int i;
|
||||
XSetWindowAttributes wa;
|
||||
Atom utf8string;
|
||||
|
||||
/* clean up any zombies immediately */
|
||||
sigchld(0);
|
||||
|
@ -1846,7 +1845,6 @@ setup(void)
|
|||
bh = drw->fonts->h + 2;
|
||||
updategeom();
|
||||
/* init atoms */
|
||||
utf8string = XInternAtom(dpy, "UTF8_STRING", False);
|
||||
atoms = atoms_create(dpy);
|
||||
/* init cursors */
|
||||
cursor[CurNormal] = drw_cur_create(drw, XC_left_ptr);
|
||||
|
@ -1865,7 +1863,7 @@ setup(void)
|
|||
wmcheckwin = XCreateSimpleWindow(dpy, root, 0, 0, 1, 1, 0, 0, 0);
|
||||
XChangeProperty(dpy, wmcheckwin, atoms->netatom[NetWMCheck], XA_WINDOW, 32,
|
||||
PropModeReplace, (unsigned char *) &wmcheckwin, 1);
|
||||
XChangeProperty(dpy, wmcheckwin, atoms->netatom[NetWMName], utf8string, 8,
|
||||
XChangeProperty(dpy, wmcheckwin, atoms->netatom[NetWMName], atoms->utf8string, 8,
|
||||
PropModeReplace, (unsigned char *) "dwm", 3);
|
||||
XChangeProperty(dpy, root, atoms->netatom[NetWMCheck], XA_WINDOW, 32,
|
||||
PropModeReplace, (unsigned char *) &wmcheckwin, 1);
|
||||
|
|
Loading…
Reference in a new issue