aboutsummaryrefslogtreecommitdiffstats
path: root/conf.c
diff options
context:
space:
mode:
authorokan2013-07-15 14:50:44 +0000
committerokan2013-07-15 14:50:44 +0000
commitb048dc85890003b1b2048f6b6ba9733e578d6478 (patch)
treee18a7141ee6af96c8f2dde65fb515a16035306c9 /conf.c
parente2b4dc0478e93db4ec1eed08ef1b5bd5869d1e03 (diff)
downloadcwm-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.c39
1 files changed, 38 insertions, 1 deletions
diff --git a/conf.c b/conf.c
index fb58505..058feb5 100644
--- a/conf.c
+++ b/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);
+}