projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0f6979
)
imwayland: Connect gtk_im_context_focus_in/out to GtkEventControllerKey
author
Takao Fujiwara
<tfujiwar@redhat.com>
Tue, 28 Jan 2020 14:47:16 +0000
(23:47 +0900)
committer
Takao Fujiwara
<tfujiwar@redhat.com>
Tue, 28 Jan 2020 14:47:16 +0000
(23:47 +0900)
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
patch
|
blob
|
history
diff --git
a/gtk/gtkeventcontrollerkey.c
b/gtk/gtkeventcontrollerkey.c
index 07c8b8150cdb2a3a02ba50a5fe029bfe30a08e39..db7acbc8fd9f330436fde4f856fa63977a7a0060 100644
(file)
--- 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)
{