Rename destroctor
This commit is contained in:
parent
b6e198af18
commit
80eb0b3cce
|
@ -28,7 +28,10 @@ Atoms atoms_create(Display *const dpy)
|
||||||
return atoms;
|
return atoms;
|
||||||
}
|
}
|
||||||
|
|
||||||
void atoms_destroy(Atoms atoms)
|
void atoms_delete(Atoms atoms)
|
||||||
{
|
{
|
||||||
|
// TODO: maybe we should assert
|
||||||
|
if (atoms == NULL) return;
|
||||||
|
|
||||||
free(atoms);
|
free(atoms);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,14 @@
|
||||||
#ifndef _ATOMS_H
|
#ifndef _ATOMS_H
|
||||||
#define _ATOMS_H
|
#define _ATOMS_H
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
|
|
||||||
|
#define ATOMS_DELETE(atoms) { \
|
||||||
|
atoms_delete(atoms); \
|
||||||
|
atoms = NULL; \
|
||||||
|
}
|
||||||
|
|
||||||
/* EWMH atoms */
|
/* EWMH atoms */
|
||||||
enum {
|
enum {
|
||||||
NetSupported, NetWMName, NetWMState, NetWMCheck,
|
NetSupported, NetWMName, NetWMState, NetWMCheck,
|
||||||
|
@ -18,6 +24,6 @@ typedef struct Atoms {
|
||||||
} *Atoms;
|
} *Atoms;
|
||||||
|
|
||||||
Atoms atoms_create(Display *dpy);
|
Atoms atoms_create(Display *dpy);
|
||||||
void atoms_destroy(Atoms atoms);
|
void atoms_delete(Atoms atoms);
|
||||||
|
|
||||||
#endif // _ATOMS_H
|
#endif // _ATOMS_H
|
||||||
|
|
Loading…
Reference in New Issue