diff options
author | Okan Demirmen <okan@cvs.openbsd.org> | 2013-07-15 14:50:45 +0000 |
---|---|---|
committer | Okan Demirmen <okan@cvs.openbsd.org> | 2013-07-15 14:50:45 +0000 |
commit | be70e602e97b58ccaeb6051e52a64636ab31aa96 (patch) | |
tree | 500636b620782d3fde57fa98c490c7306257bed1 /app/cwm/conf.c | |
parent | 3a2a61063bb13507d6208279c6b7a501cd8fb92c (diff) |
simplify atom handling; allows us to limit to one round-trip to server
for gathering Atoms.
Diffstat (limited to 'app/cwm/conf.c')
-rw-r--r-- | app/cwm/conf.c | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/app/cwm/conf.c b/app/cwm/conf.c index fb585052a..058feb52b 100644 --- a/app/cwm/conf.c +++ b/app/cwm/conf.c @@ -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); +} |