about summary refs log tree commit diff
path: root/exwm-core.el
diff options
context:
space:
mode:
Diffstat (limited to 'exwm-core.el')
-rw-r--r--exwm-core.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/exwm-core.el b/exwm-core.el
index e13a319bf354..9b6877b83f11 100644
--- a/exwm-core.el
+++ b/exwm-core.el
@@ -131,6 +131,15 @@ Nil can be passed as placeholder."
                                          (if height xcb:ConfigWindow:Height 0))
                      :x x :y y :width width :height height)))
 
+(defun exwm--intern-atom (atom)
+  "Intern X11 ATOM."
+  (slot-value (xcb:+request-unchecked+reply exwm--connection
+                  (make-instance 'xcb:InternAtom
+                                 :only-if-exists 0
+                                 :name-len (length atom)
+                                 :name atom))
+              'atom))
+
 (defmacro exwm--defer (secs function &rest args)
   "Defer the execution of FUNCTION.