#include "gtkimmodule.h"
#include "gtkimcontextsimple.h"
#include "gtksettings.h"
-#include "gtkmain.h"
+#include "gtkmainprivate.h"
#include "gtkrc.h"
#include "gtkintl.h"
-#include "gtkalias.h"
/* Do *not* include "gtkprivate.h" in this file. If you do, the
* correct_libdir_prefix() and correct_localedir_prefix() functions
#endif
-static GtkIMModule *
+G_GNUC_UNUSED static GtkIMModule *
add_builtin_module (const gchar *module_name,
const GtkIMContextInfo **contexts,
int n_contexts)
/* Check if the certain immodule is set in XSETTINGS.
*/
- if (GDK_IS_DRAWABLE (client_window))
+ if (GDK_IS_WINDOW (client_window))
{
- screen = gdk_drawable_get_screen (GDK_DRAWABLE (client_window));
- if (screen)
- settings = gtk_settings_get_for_screen (screen);
- else
- settings = gtk_settings_get_default ();
-
+ screen = gdk_window_get_screen (client_window);
+ settings = gtk_settings_get_for_screen (screen);
g_object_get (G_OBJECT (settings), "gtk-im-module", &tmp, NULL);
if (tmp)
{
if (strcmp (tmp, SIMPLE_ID) == 0)
context_id = SIMPLE_ID;
- else
+ else
{
GtkIMModule *module;
module = g_hash_table_lookup (contexts_hash, tmp);
}
g_free (tmp);
- if (context_id)
+ if (context_id)
return context_id;
}
}