about summary refs log tree commit diff
path: root/exwm-core.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2019-02-06T00·00+0000
committerChris Feng <chris.w.feng@gmail.com>2019-02-06T00·00+0000
commit0f7269c4ec666eb8bcf2616abbb5af46087cbdea (patch)
tree6b6ceb5b7f120a4671178b33d687ffa1da312629 /exwm-core.el
parent44629818bacf3e3a10a37e570fdee2e963dbcc7b (diff)
Add input method support
; The code is basically refactored from
; https://github.com/ch11ng/exim to get better maintenance.

* exwm-xim.el: New module making Emacs's builtin input methods usable
for interacting with X windows.

* exwm-core.el (exwm--intern-atom): New function for intern X11 atoms.
* exwm-input.el (exwm-input--init):
* exwm-manage.el (exwm-manage--init): Use it.
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 e13a319bf3..9b6877b83f 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.