forked from AuroraMiddleware/gtk
text: Don't leak emoji chooser
This commit is contained in:
parent
9ceb41f9a4
commit
4f11bbc59b
@ -1783,6 +1783,7 @@ gtk_text_dispose (GObject *object)
|
|||||||
GtkText *self = GTK_TEXT (object);
|
GtkText *self = GTK_TEXT (object);
|
||||||
GtkTextPrivate *priv = gtk_text_get_instance_private (self);
|
GtkTextPrivate *priv = gtk_text_get_instance_private (self);
|
||||||
GdkKeymap *keymap;
|
GdkKeymap *keymap;
|
||||||
|
GtkWidget *chooser;
|
||||||
|
|
||||||
priv->current_pos = 0;
|
priv->current_pos = 0;
|
||||||
|
|
||||||
@ -1794,6 +1795,9 @@ gtk_text_dispose (GObject *object)
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_clear_pointer (&priv->emoji_completion, gtk_widget_unparent);
|
g_clear_pointer (&priv->emoji_completion, gtk_widget_unparent);
|
||||||
|
chooser = g_object_get_data (object, "gtk-emoji-chooser");
|
||||||
|
if (chooser)
|
||||||
|
gtk_widget_unparent (chooser);
|
||||||
|
|
||||||
keymap = gdk_display_get_keymap (gtk_widget_get_display (GTK_WIDGET (object)));
|
keymap = gdk_display_get_keymap (gtk_widget_get_display (GTK_WIDGET (object)));
|
||||||
g_signal_handlers_disconnect_by_func (keymap, keymap_direction_changed, self);
|
g_signal_handlers_disconnect_by_func (keymap, keymap_direction_changed, self);
|
||||||
|
Loading…
Reference in New Issue
Block a user