[gtk/wip/carlosg/for-master: 3/6] gtk/imcontextwayland: Unset focus when unsetting widget
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/carlosg/for-master: 3/6] gtk/imcontextwayland: Unset focus when unsetting widget
- Date: Thu, 5 Nov 2020 20:49:11 +0000 (UTC)
commit fa5fa3a88151f838e96e2aacab8ce0409d3df41d
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Nov 5 16:00:29 2020 +0100
gtk/imcontextwayland: Unset focus when unsetting widget
In destruction paths of a focused entry, the IM context might first
end up detached from its widget, then destroyed. This currently prevents
the IM context from detaching itself from the GtkIMContextWaylandGlobal.
Make it do so when unsetting the client widget, so the IM context gets
properly unfocused before destruction.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3176
gtk/gtkimcontextwayland.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/gtk/gtkimcontextwayland.c b/gtk/gtkimcontextwayland.c
index 70b46e317f..ad89d83a07 100644
--- a/gtk/gtkimcontextwayland.c
+++ b/gtk/gtkimcontextwayland.c
@@ -546,6 +546,7 @@ gtk_im_context_wayland_set_client_widget (GtkIMContext *context,
if (context_wayland->widget)
{
+ gtk_im_context_wayland_focus_out (context);
gtk_widget_remove_controller (context_wayland->widget, GTK_EVENT_CONTROLLER
(context_wayland->gesture));
context_wayland->gesture = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]