len = context->pending_surrounding_delete.after_length
+ context->pending_surrounding_delete.before_length;
if (len > 0)
- g_signal_emit_by_name (global->current, "delete-surrounding",
- -context->pending_surrounding_delete.before_length,
- len, &retval);
+ {
+ g_signal_emit_by_name (global->current, "delete-surrounding",
+ -context->pending_surrounding_delete.before_length,
+ len, &retval);
+ notify_im_change (GTK_IM_CONTEXT_WAYLAND (context),
+ ZWP_TEXT_INPUT_V3_CHANGE_CAUSE_INPUT_METHOD);
+ }
+
context->pending_surrounding_delete = defaults;
}
return TRUE;
}
+static void
+gtk_im_context_wayland_commit (GtkIMContext *context,
+ const gchar *str)
+{
+ if (GTK_IM_CONTEXT_CLASS (gtk_im_context_wayland_parent_class)->commit)
+ GTK_IM_CONTEXT_CLASS (gtk_im_context_wayland_parent_class)->commit (context, str);
+
+ notify_im_change (GTK_IM_CONTEXT_WAYLAND (context),
+ ZWP_TEXT_INPUT_V3_CHANGE_CAUSE_INPUT_METHOD);
+}
+
static void
gtk_im_context_wayland_class_init (GtkIMContextWaylandClass *klass)
{
im_context_class->set_use_preedit = gtk_im_context_wayland_set_use_preedit;
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;
}
static void
{
gtk_text_enter_text (self, str);
gtk_text_obscure_mouse_cursor (self);
- gtk_im_context_reset (context);
}
}
gtk_editable_delete_text (GTK_EDITABLE (self),
priv->current_pos + offset,
priv->current_pos + offset + n_chars);
- gtk_im_context_reset (context);
}
return TRUE;
gtk_text_view_commit_text (text_view, str);
gtk_text_view_reset_blink_time (text_view);
gtk_text_view_pend_cursor_blink (text_view);
- gtk_im_context_reset (context);
}
static void
gtk_text_iter_forward_chars (&start, offset);
gtk_text_iter_forward_chars (&end, offset + n_chars);
- if (gtk_text_buffer_delete_interactive (priv->buffer, &start, &end,
- priv->editable))
- gtk_im_context_reset (context);
+ gtk_text_buffer_delete_interactive (priv->buffer, &start, &end,
+ priv->editable);
return TRUE;
}