[gtk: 1/2] imwayland: Connect gtk_im_context_focus_in/out to GtkEventControllerKey
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 1/2] imwayland: Connect gtk_im_context_focus_in/out to GtkEventControllerKey
- Date: Wed, 29 Jan 2020 11:23:45 +0000 (UTC)
commit 5be14577d6e2fc5ba0d564d15619ceecbd456a1a
Author: Takao Fujiwara <tfujiwar redhat com>
Date: Tue Jan 28 23:47:16 2020 +0900
imwayland: Connect gtk_im_context_focus_in/out to GtkEventControllerKey
GtkEventControllerKey can handle GDK_FOCUS_CHANGE and call
gtk_im_context_focus_in/out directly.
https://gitlab.gnome.org/GNOME/gtk/issues/2390
gtk/gtkeventcontrollerkey.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/gtk/gtkeventcontrollerkey.c b/gtk/gtkeventcontrollerkey.c
index 07c8b8150c..db7acbc8fd 100644
--- a/gtk/gtkeventcontrollerkey.c
+++ b/gtk/gtkeventcontrollerkey.c
@@ -129,6 +129,13 @@ update_focus (GtkEventControllerKey *key,
{
key->is_focus = is_focus;
g_object_notify (G_OBJECT (key), "is-focus");
+ if (key->im_context)
+ {
+ if (focus_in)
+ gtk_im_context_focus_in (key->im_context);
+ else
+ gtk_im_context_focus_out (key->im_context);
+ }
}
if (key->contains_focus != contains_focus)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]