mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1152066 - Remove ugly dynamic loading code now that we can assume this symbol exists. r=roc
This commit is contained in:
parent
ce7fa7a16c
commit
91218174b8
@ -10,11 +10,6 @@
|
||||
#include "nsBidiKeyboard.h"
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
typedef gboolean (*GdkKeymapHaveBidiLayoutsType)(GdkKeymap *keymap);
|
||||
static GdkKeymapHaveBidiLayoutsType GdkKeymapHaveBidiLayouts = nullptr;
|
||||
#endif
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsBidiKeyboard, nsIBidiKeyboard)
|
||||
|
||||
nsBidiKeyboard::nsBidiKeyboard()
|
||||
@ -25,32 +20,12 @@ nsBidiKeyboard::nsBidiKeyboard()
|
||||
NS_IMETHODIMP
|
||||
nsBidiKeyboard::Reset()
|
||||
{
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
PRLibrary *gtklib = nullptr;
|
||||
#if defined(MOZ_X11)
|
||||
if (!GdkKeymapHaveBidiLayouts) {
|
||||
GdkKeymapHaveBidiLayouts = (GdkKeymapHaveBidiLayoutsType)
|
||||
PR_FindFunctionSymbolAndLibrary("gdk_keymap_have_bidi_layouts",
|
||||
>klib);
|
||||
if (gtklib)
|
||||
PR_UnloadLibrary(gtklib);
|
||||
}
|
||||
#endif
|
||||
|
||||
mHaveBidiKeyboards = false;
|
||||
if (GdkKeymapHaveBidiLayouts)
|
||||
mHaveBidiKeyboards = (*GdkKeymapHaveBidiLayouts)(nullptr);
|
||||
#else
|
||||
mHaveBidiKeyboards = gdk_keymap_have_bidi_layouts(gdk_keymap_get_default());
|
||||
#endif
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsBidiKeyboard::~nsBidiKeyboard()
|
||||
{
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
GdkKeymapHaveBidiLayouts = nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
Loading…
Reference in New Issue
Block a user