summaryrefslogtreecommitdiff
path: root/gdk/gdkkeys.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2013-03-23 13:51:24 -0400
committerColin Walters <walters@verbum.org>2013-03-23 17:07:15 -0400
commitd6b4e849578910a354f671d8de09616af7f3ebe1 (patch)
treea026d3f734434245e835ebcc41fd343048d3bf81 /gdk/gdkkeys.c
parent564b4e667a046ff1e3eadff8de465496746a24ee (diff)
downloadgtk+-d6b4e849578910a354f671d8de09616af7f3ebe1.tar.gz
gdkkeys: Avoid instantiating a display manager if none exists
For introspection scanning which ends up calling class_init() which in turn calls into the keybindings code, we can just use the fallback keyval conversion code. https://bugzilla.gnome.org/show_bug.cgi?id=696457
Diffstat (limited to 'gdk/gdkkeys.c')
-rw-r--r--gdk/gdkkeys.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gdk/gdkkeys.c b/gdk/gdkkeys.c
index 6b46dbf7df..9194d7f5cb 100644
--- a/gdk/gdkkeys.c
+++ b/gdk/gdkkeys.c
@@ -203,9 +203,12 @@ gdk_keyval_convert_case (guint symbol,
guint *lower,
guint *upper)
{
- GdkDisplayManager *manager = gdk_display_manager_get ();
+ GdkDisplayManager *manager = _gdk_display_manager_get_nocreate ();
- GDK_DISPLAY_MANAGER_GET_CLASS (manager)->keyval_convert_case (manager, symbol, lower, upper);
+ if (manager)
+ GDK_DISPLAY_MANAGER_GET_CLASS (manager)->keyval_convert_case (manager, symbol, lower, upper);
+ else
+ _gdk_display_manager_real_keyval_convert_case (NULL, symbol, lower, upper);
}
/**