зеркало из https://github.com/mozilla/gecko-dev.git
b=1068964 Remove gtk_check_version for GTK 2 r=karlt
Remove gtk_check_version() checks for GTK 2 as the minimum version now covers all cases --HG-- extra : transplant_source : Z%F4%8A2%B1a%D4%16%3B%C1%9F%92b%92%15%3E%AB%9Cg%81
This commit is contained in:
Родитель
7f81beb570
Коммит
5ddca8d5dd
|
@ -263,36 +263,7 @@ nsGtkIMModule::PrepareToDestroyContext(GtkIMContext *aContext)
|
|||
|
||||
GType slaveType = G_TYPE_FROM_INSTANCE(slave);
|
||||
const gchar *im_type_name = g_type_name(slaveType);
|
||||
if (strcmp(im_type_name, "GtkIMContextXIM") == 0) {
|
||||
if (gtk_check_version(2, 12, 1) == nullptr) {
|
||||
return; // gtk bug has been fixed
|
||||
}
|
||||
|
||||
struct GtkIMContextXIM
|
||||
{
|
||||
GtkIMContext parent;
|
||||
gpointer private_data;
|
||||
// ... other fields
|
||||
};
|
||||
|
||||
gpointer signal_data =
|
||||
reinterpret_cast<GtkIMContextXIM*>(slave)->private_data;
|
||||
if (!signal_data) {
|
||||
return;
|
||||
}
|
||||
|
||||
g_signal_handlers_disconnect_matched(
|
||||
gtk_widget_get_display(GTK_WIDGET(container)),
|
||||
G_SIGNAL_MATCH_DATA, 0, 0, nullptr, nullptr, signal_data);
|
||||
|
||||
// Add a reference to prevent the XIM module from being unloaded
|
||||
// and reloaded: each time the module is loaded and used, it
|
||||
// opens (and doesn't close) new XOpenIM connections.
|
||||
static gpointer gtk_xim_context_class =
|
||||
g_type_class_ref(slaveType);
|
||||
// Mute unused variable warning:
|
||||
(void)gtk_xim_context_class;
|
||||
} else if (strcmp(im_type_name, "GtkIMContextIIIM") == 0) {
|
||||
if (strcmp(im_type_name, "GtkIMContextIIIM") == 0) {
|
||||
// Add a reference to prevent the IIIM module from being unloaded
|
||||
static gpointer gtk_iiim_context_class =
|
||||
g_type_class_ref(slaveType);
|
||||
|
|
Загрузка…
Ссылка в новой задаче