mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-16 15:14:17 +00:00
Merge branch 'wip/carlosg/immulticontext-display-switch' into 'main'
gtkimmulticontext: Handle switches between displays Closes #4805 See merge request GNOME/gtk!4605
This commit is contained in:
commit
0128574ca1
@ -314,6 +314,11 @@ gtk_im_multicontext_set_client_widget (GtkIMContext *context,
|
|||||||
GtkIMContext *delegate;
|
GtkIMContext *delegate;
|
||||||
GtkSettings *settings;
|
GtkSettings *settings;
|
||||||
|
|
||||||
|
if (priv->client_widget == widget)
|
||||||
|
return;
|
||||||
|
|
||||||
|
gtk_im_multicontext_set_delegate (self, NULL, TRUE);
|
||||||
|
|
||||||
if (priv->client_widget != NULL)
|
if (priv->client_widget != NULL)
|
||||||
{
|
{
|
||||||
settings = gtk_widget_get_settings (priv->client_widget);
|
settings = gtk_widget_get_settings (priv->client_widget);
|
||||||
@ -332,11 +337,11 @@ gtk_im_multicontext_set_client_widget (GtkIMContext *context,
|
|||||||
g_signal_connect (settings, "notify::gtk-im-module",
|
g_signal_connect (settings, "notify::gtk-im-module",
|
||||||
G_CALLBACK (im_module_setting_changed),
|
G_CALLBACK (im_module_setting_changed),
|
||||||
self);
|
self);
|
||||||
}
|
|
||||||
|
|
||||||
delegate = gtk_im_multicontext_get_delegate (self);
|
delegate = gtk_im_multicontext_get_delegate (self);
|
||||||
if (delegate)
|
if (delegate)
|
||||||
gtk_im_context_set_client_widget (delegate, widget);
|
gtk_im_context_set_client_widget (delegate, widget);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user