immodule: Avoid GdkScreen api
authorMatthias Clasen <mclasen@redhat.com>
Mon, 30 Oct 2017 23:27:36 +0000 (19:27 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 30 Oct 2017 23:27:36 +0000 (19:27 -0400)
Another place where it is not needed.

gtk/gtkimmodule.c

index ea1990b3d7b6dda9dc467407d9fbeba67dbc1e10..f3f25409bc35ddb8319f737f0e6e7e4d4898b2c9 100644 (file)
@@ -874,7 +874,6 @@ _gtk_im_module_get_default_context_id (void)
   gint i;
   gchar *tmp_locale, *tmp, **immodules;
   const gchar *envvar;
-  GdkScreen *screen;
   GtkSettings *settings;
 
   if (!contexts_hash)
@@ -891,10 +890,8 @@ _gtk_im_module_get_default_context_id (void)
           return context_id;
     }
 
-  /* Check if the certain immodule is set in XSETTINGS.
-   */
-  screen = gdk_screen_get_default ();
-  settings = gtk_settings_get_for_screen (screen);
+  /* Check if the certain immodule is set in XSETTINGS. */
+  settings = gtk_settings_get_default ();
   g_object_get (G_OBJECT (settings), "gtk-im-module", &tmp, NULL);
   if (tmp)
     {