mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1158791 - Try harder to avoid Gtk-Critical errors in xpcshell tests. r=karlt
This commit is contained in:
parent
51f4882b20
commit
0fa6a41d07
@ -42,6 +42,7 @@ STUB(gdk_get_program_class)
|
||||
STUB(gdk_keymap_get_default)
|
||||
STUB(gdk_keymap_get_direction)
|
||||
STUB(gdk_keymap_get_entries_for_keyval)
|
||||
STUB(gdk_keymap_get_for_display)
|
||||
STUB(gdk_keymap_have_bidi_layouts)
|
||||
STUB(gdk_keymap_translate_keyboard_state)
|
||||
STUB(gdk_keyval_name)
|
||||
|
@ -22,7 +22,13 @@ nsBidiKeyboard::Reset()
|
||||
{
|
||||
// NB: The default keymap can be null (e.g. in xpcshell). In that case,
|
||||
// simply assume that we don't have bidi keyboards.
|
||||
GdkKeymap *keymap = gdk_keymap_get_default();
|
||||
mHaveBidiKeyboards = false;
|
||||
|
||||
GdkDisplay *display = gdk_display_get_default();
|
||||
if (!display)
|
||||
return NS_OK;
|
||||
|
||||
GdkKeymap *keymap = gdk_keymap_get_for_display(display);
|
||||
mHaveBidiKeyboards = keymap && gdk_keymap_have_bidi_layouts(keymap);
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user