From 9d455b48e47d2f4182ef55785db4d55355a75e4d Mon Sep 17 00:00:00 2001 From: xdavidwu Date: Sun, 12 Jan 2020 13:19:14 +0800 Subject: input-method: avoid and log unneeded set_focus --- sway/input/text_input.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sway/input/text_input.c b/sway/input/text_input.c index f3fca68e..551d6586 100644 --- a/sway/input/text_input.c +++ b/sway/input/text_input.c @@ -297,6 +297,9 @@ void sway_input_method_relay_set_focus(struct sway_input_method_relay *relay, if (surface != text_input->input->focused_surface) { relay_disable_text_input(relay, text_input); wlr_text_input_v3_send_leave(text_input->input); + } else { + sway_log(SWAY_DEBUG, "IM relay set_focus already focused"); + continue; } } -- cgit v1.2.3-54-g00ecf