diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2022-11-27 13:04:29 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2022-11-28 15:46:41 +0100 |
commit | e3b0d57ce733f29b536af89a2ca28a8dd8d943d7 (patch) | |
tree | 288b61d8788b210693258da72a20e2ce55bc6fca | |
parent | 6d0f7a2d31cf540faf1cbc912854996434f9f48d (diff) | |
download | gtk+-e3b0d57ce733f29b536af89a2ca28a8dd8d943d7.tar.gz |
imcontextwayland: Implement activate_osk() vmethod
This method does explicitly what the builtin GtkClickGesture in
the IM context is doing implicitly. The gesture will be dropped
after porting is done.
-rw-r--r-- | gtk/gtkimcontextwayland.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gtk/gtkimcontextwayland.c b/gtk/gtkimcontextwayland.c index 0581772bd6..f6c037313e 100644 --- a/gtk/gtkimcontextwayland.c +++ b/gtk/gtkimcontextwayland.c @@ -974,6 +974,20 @@ gtk_im_context_wayland_commit (GtkIMContext *context, } static void +gtk_im_context_wayland_activate_osk (GtkIMContext *context) +{ + GtkIMContextWaylandGlobal *global; + + global = gtk_im_context_wayland_get_global (GTK_IM_CONTEXT_WAYLAND (context)); + if (global == NULL) + return; + + zwp_text_input_v3_enable (global->text_input); + notify_im_change (GTK_IM_CONTEXT_WAYLAND (context), + ZWP_TEXT_INPUT_V3_CHANGE_CAUSE_OTHER); +} + +static void gtk_im_context_wayland_class_init (GtkIMContextWaylandClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); @@ -992,6 +1006,7 @@ gtk_im_context_wayland_class_init (GtkIMContextWaylandClass *klass) im_context_class->set_surrounding_with_selection = gtk_im_context_wayland_set_surrounding; im_context_class->get_surrounding_with_selection = gtk_im_context_wayland_get_surrounding; im_context_class->commit = gtk_im_context_wayland_commit; + im_context_class->activate_osk = gtk_im_context_wayland_activate_osk; } static void |