[gtk/wip/carlosg/issue-1317] modules: Check current context before retrieving surrounding
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/carlosg/issue-1317] modules: Check current context before retrieving surrounding
- Date: Wed, 12 Sep 2018 11:55:08 +0000 (UTC)
commit 88dc784256289820fac148fc5c23d0ad92419881
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Sep 7 16:54:13 2018 +0200
modules: Check current context before retrieving surrounding
There may be situations where this might get called while the
currently focused context just went away (eg. after setting the
text widget unsensitive).
Closes: #1317
modules/input/imwayland.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/modules/input/imwayland.c b/modules/input/imwayland.c
index 3589c4c130..32d3c4fb0e 100644
--- a/modules/input/imwayland.c
+++ b/modules/input/imwayland.c
@@ -121,6 +121,9 @@ notify_external_change (GtkIMContextWayland *context)
{
gboolean result;
+ if (!global->current)
+ return;
+
context->surrounding_change = ZWP_TEXT_INPUT_V3_CHANGE_CAUSE_OTHER;
g_signal_emit_by_name (global->current, "retrieve-surrounding", &result);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]