imwayland: Collect return value from ::delete-surrounding signal
There's not much we can do about the signal not being handled, but we should fetch the return value anyway.
This commit is contained in:
parent
b4464e1274
commit
c8d47b0c84
@ -240,18 +240,18 @@ text_input_delete_surrounding_text_apply (GtkIMContextWaylandGlobal *global,
|
|||||||
gboolean valid)
|
gboolean valid)
|
||||||
{
|
{
|
||||||
GtkIMContextWayland *context;
|
GtkIMContextWayland *context;
|
||||||
|
gboolean retval;
|
||||||
gint len;
|
gint len;
|
||||||
struct surrounding_delete defaults = {0};
|
struct surrounding_delete defaults = {0};
|
||||||
|
|
||||||
context = GTK_IM_CONTEXT_WAYLAND (global->current);
|
context = GTK_IM_CONTEXT_WAYLAND (global->current);
|
||||||
|
|
||||||
len = context->pending_surrounding_delete.after_length
|
len = context->pending_surrounding_delete.after_length
|
||||||
+ context->pending_surrounding_delete.before_length;
|
+ context->pending_surrounding_delete.before_length;
|
||||||
if (len > 0 && valid)
|
if (len > 0 && valid)
|
||||||
g_signal_emit_by_name (global->current, "delete-surrounding",
|
g_signal_emit_by_name (global->current, "delete-surrounding",
|
||||||
-context->pending_surrounding_delete.before_length,
|
-context->pending_surrounding_delete.before_length,
|
||||||
len);
|
len, &retval);
|
||||||
context->pending_surrounding_delete = defaults;
|
context->pending_surrounding_delete = defaults;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user