aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-11-28 20:59:58 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-12-07 19:44:10 +0000
commite97024116e0efcf956fd7504aeee70bd3ee0d999 (patch)
treeec78e4ab7a997bad653c92634a601e012bf74b97
parentime: wip: add text-input object to seat (diff)
ime: disable text-input on surface leave
-rw-r--r--ime.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ime.c b/ime.c
index baac7db5..1619e584 100644
--- a/ime.c
+++ b/ime.c
@@ -48,7 +48,7 @@ enter(void *data, struct zwp_text_input_v3 *zwp_text_input_v3,
break;
}
- zwp_text_input_v3_commit(seat->wl_text_input);
+ zwp_text_input_v3_commit(seat->wl_text_input);
}
static void
@@ -57,13 +57,15 @@ leave(void *data, struct zwp_text_input_v3 *zwp_text_input_v3,
{
struct seat *seat = data;
LOG_DBG("leave: seat=%s", seat->name);
+ zwp_text_input_v3_disable(seat->wl_text_input);
+ zwp_text_input_v3_commit(seat->wl_text_input);
}
static void
preedit_string(void *data, struct zwp_text_input_v3 *zwp_text_input_v3,
const char *text, int32_t cursor_begin, int32_t cursor_end)
{
- LOG_DBG("preedit-strig: text=%s, begin=%d, end=%d", text, cursor_begin, cursor_end);
+ LOG_DBG("preedit-string: text=%s, begin=%d, end=%d", text, cursor_begin, cursor_end);
}
static void