Loading widget/gtk/GRefPtr.h +1 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ GOBJECT_TRAITS(GdkDragContext) GOBJECT_TRAITS(GDBusMessage) GOBJECT_TRAITS(GdkPixbuf) GOBJECT_TRAITS(GCancellable) GOBJECT_TRAITS(GtkIMContext) GOBJECT_TRAITS(GUnixFDList) #ifdef MOZ_ENABLE_DBUS Loading widget/gtk/IMContextWrapper.cpp +13 −1 Original line number Diff line number Diff line Loading @@ -10,6 +10,8 @@ #include "prenv.h" #include "IMContextWrapper.h" #include "GRefPtr.h" #include "nsGtkKeyUtils.h" #include "nsWindow.h" #include "mozilla/AutoRestore.h" Loading Loading @@ -1728,7 +1730,17 @@ void IMContextWrapper::OnEndCompositionNative(GtkIMContext* aContext) { /* static */ void IMContextWrapper::OnChangeCompositionCallback(GtkIMContext* aContext, IMContextWrapper* aModule) { aModule->OnChangeCompositionNative(aContext); RefPtr module = aModule; module->OnChangeCompositionNative(aContext); if (module->IsDestroyed()) { // A strong reference is already held during "preedit-changed" emission, // but _ibus_context_destroy_cb() in ibus 1.5.28 and // _fcitx_im_context_close_im_cb() in fcitx 4.2.9.9 want their // GtkIMContexts to live a little longer. See bug 1824634. NS_DispatchToMainThread( NS_NewRunnableFunction(__func__, [context = RefPtr{aContext}]() {})); } } void IMContextWrapper::OnChangeCompositionNative(GtkIMContext* aContext) { Loading Loading
widget/gtk/GRefPtr.h +1 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ GOBJECT_TRAITS(GdkDragContext) GOBJECT_TRAITS(GDBusMessage) GOBJECT_TRAITS(GdkPixbuf) GOBJECT_TRAITS(GCancellable) GOBJECT_TRAITS(GtkIMContext) GOBJECT_TRAITS(GUnixFDList) #ifdef MOZ_ENABLE_DBUS Loading
widget/gtk/IMContextWrapper.cpp +13 −1 Original line number Diff line number Diff line Loading @@ -10,6 +10,8 @@ #include "prenv.h" #include "IMContextWrapper.h" #include "GRefPtr.h" #include "nsGtkKeyUtils.h" #include "nsWindow.h" #include "mozilla/AutoRestore.h" Loading Loading @@ -1728,7 +1730,17 @@ void IMContextWrapper::OnEndCompositionNative(GtkIMContext* aContext) { /* static */ void IMContextWrapper::OnChangeCompositionCallback(GtkIMContext* aContext, IMContextWrapper* aModule) { aModule->OnChangeCompositionNative(aContext); RefPtr module = aModule; module->OnChangeCompositionNative(aContext); if (module->IsDestroyed()) { // A strong reference is already held during "preedit-changed" emission, // but _ibus_context_destroy_cb() in ibus 1.5.28 and // _fcitx_im_context_close_im_cb() in fcitx 4.2.9.9 want their // GtkIMContexts to live a little longer. See bug 1824634. NS_DispatchToMainThread( NS_NewRunnableFunction(__func__, [context = RefPtr{aContext}]() {})); } } void IMContextWrapper::OnChangeCompositionNative(GtkIMContext* aContext) { Loading