about summary refs log tree commit diff
path: root/third_party/exwm/exwm-xim.el
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-12-08T19·16+0300
committerVincent Ambo <mail@tazj.in>2021-12-08T19·17+0300
commit57b37cdc83bdebf2c2e2bcc0c01facc63c29c941 (patch)
tree899e0b6b4b81ca3932e4d2436156e731a53ee126 /third_party/exwm/exwm-xim.el
parent14bf3f3cd98bfd766d011c22d45b9d74d84c7da7 (diff)
parent10bd12234e896d35a2c4eafabc62a31126d23bf3 (diff)
subtree(3p/exwm): Update to upstream '10bd1223'
A lot has happened in the meantime (EXWM maintainer change) and this
pulls in all the relevant changes since then.

It may become unnecessary to keep EXWM subtreed, but we'll get to that
later.

Change-Id: I45cc06d747d84b3d28fd0db0e4bb3b749a956583
Diffstat (limited to 'third_party/exwm/exwm-xim.el')
-rw-r--r--third_party/exwm/exwm-xim.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/third_party/exwm/exwm-xim.el b/third_party/exwm/exwm-xim.el
index acf718e27f..9589648d22 100644
--- a/third_party/exwm/exwm-xim.el
+++ b/third_party/exwm/exwm-xim.el
@@ -1,6 +1,6 @@
 ;;; exwm-xim.el --- XIM Module for EXWM  -*- lexical-binding: t -*-
 
-;; Copyright (C) 2019-2020 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2021 Free Software Foundation, Inc.
 
 ;; Author: Chris Feng <chris.w.feng@gmail.com>
 
@@ -161,6 +161,10 @@ C,no"
 (defvar exwm-xim--_XIM_PROTOCOL nil)
 (defvar exwm-xim--_XIM_XCONNECT nil)
 
+(defvar exwm-xim-buffer-p nil
+  "Whether current buffer is used by exwm-xim.")
+(make-variable-buffer-local 'exwm-xim-buffer-p)
+
 (defun exwm-xim--on-SelectionRequest (data _synthetic)
   "Handle SelectionRequest events on IMS window.
 
@@ -585,6 +589,9 @@ The actual XIM request is in client message data or a property."
           (exwm-input--grab-keyboard))
         (unwind-protect
             (with-temp-buffer
+              ;; This variable is used to test whether exwm-xim is enabled.
+              ;; Used by e.g. pyim-probe.
+              (setq-local exwm-xim-buffer-p t)
               ;; Always show key strokes.
               (let ((input-method-use-echo-area t)
                     (exwm-input-line-mode-passthrough t))