diff options
author | okan | 2013-07-15 14:50:44 +0000 |
---|---|---|
committer | okan | 2013-07-15 14:50:44 +0000 |
commit | b048dc85890003b1b2048f6b6ba9733e578d6478 (patch) | |
tree | e18a7141ee6af96c8f2dde65fb515a16035306c9 /conf.c | |
parent | e2b4dc0478e93db4ec1eed08ef1b5bd5869d1e03 (diff) | |
download | cwm-b048dc85890003b1b2048f6b6ba9733e578d6478.tar.gz |
simplify atom handling; allows us to limit to one round-trip to server
for gathering Atoms.
Diffstat (limited to 'conf.c')
-rw-r--r-- | conf.c | 39 |
1 files changed, 38 insertions, 1 deletions
@@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: conf.c,v 1.142 2013/07/10 14:11:42 okan Exp $ + * $OpenBSD: conf.c,v 1.143 2013/07/15 14:50:44 okan Exp $ */ #include <sys/param.h> @@ -663,3 +663,40 @@ conf_grab_kbd(Window win) TAILQ_FOREACH(kb, &Conf.keybindingq, entry) xu_key_grab(win, kb->modmask, kb->keysym); } + +static char *cwmhints[] = { + "WM_STATE", + "WM_DELETE_WINDOW", + "WM_TAKE_FOCUS", + "WM_PROTOCOLS", + "_MOTIF_WM_HINTS", + "UTF8_STRING", + "WM_CHANGE_STATE", +}; +static char *ewmhints[] = { + "_NET_SUPPORTED", + "_NET_SUPPORTING_WM_CHECK", + "_NET_ACTIVE_WINDOW", + "_NET_CLIENT_LIST", + "_NET_NUMBER_OF_DESKTOPS", + "_NET_CURRENT_DESKTOP", + "_NET_DESKTOP_VIEWPORT", + "_NET_DESKTOP_GEOMETRY", + "_NET_VIRTUAL_ROOTS", + "_NET_SHOWING_DESKTOP", + "_NET_DESKTOP_NAMES", + "_NET_WORKAREA", + "_NET_WM_NAME", + "_NET_WM_DESKTOP", + "_NET_CLOSE_WINDOW", + "_NET_WM_STATE", + "_NET_WM_STATE_MAXIMIZED_VERT", + "_NET_WM_STATE_MAXIMIZED_HORZ", +}; + +void +conf_atoms(void) +{ + XInternAtoms(X_Dpy, cwmhints, nitems(cwmhints), False, cwmh); + XInternAtoms(X_Dpy, ewmhints, nitems(ewmhints), False, ewmh); +} |