diff --git a/ChangeLog b/ChangeLog index 179035e7d5..0940e0cb9d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2005-06-26 Matthias Clasen + * modules/input/gtkimcontextxim.c (gtk_im_context_xim_finalize): + Unregister XIM callbacks here. (#309054) + + * modules/input/gtkimcontextxim.h: Small cleanup. + * gtk/gtkmenu.c (gtk_menu_paint): Pay attention to the scroll offset when drawing the box. (#308834, Tom von Schwerdtner) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 179035e7d5..0940e0cb9d 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,10 @@ 2005-06-26 Matthias Clasen + * modules/input/gtkimcontextxim.c (gtk_im_context_xim_finalize): + Unregister XIM callbacks here. (#309054) + + * modules/input/gtkimcontextxim.h: Small cleanup. + * gtk/gtkmenu.c (gtk_menu_paint): Pay attention to the scroll offset when drawing the box. (#308834, Tom von Schwerdtner) diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 179035e7d5..0940e0cb9d 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,5 +1,10 @@ 2005-06-26 Matthias Clasen + * modules/input/gtkimcontextxim.c (gtk_im_context_xim_finalize): + Unregister XIM callbacks here. (#309054) + + * modules/input/gtkimcontextxim.h: Small cleanup. + * gtk/gtkmenu.c (gtk_menu_paint): Pay attention to the scroll offset when drawing the box. (#308834, Tom von Schwerdtner) diff --git a/modules/input/gtkimcontextxim.c b/modules/input/gtkimcontextxim.c index 220a04a8f2..86c972d238 100644 --- a/modules/input/gtkimcontextxim.c +++ b/modules/input/gtkimcontextxim.c @@ -565,6 +565,24 @@ gtk_im_context_xim_finalize (GObject *obj) context_xim->finalizing = TRUE; + if (context_xim->im_info) + { + GdkDisplay *display; + XIMCallback im_destroy_callback; + + display = gdk_screen_get_display (context_xim->im_info->screen); + XUnregisterIMInstantiateCallback (GDK_DISPLAY_XDISPLAY (display), + NULL, NULL, NULL, + xim_instantiate_callback, + (XPointer)context_xim->im_info); + + im_destroy_callback.client_data = NULL; + im_destroy_callback.callback = NULL; + XSetIMValues (context_xim->im_info->im, + XNDestroyCallback, &im_destroy_callback, + NULL); + } + set_ic_client_window (context_xim, NULL); g_free (context_xim->locale); diff --git a/modules/input/gtkimcontextxim.h b/modules/input/gtkimcontextxim.h index bdcdb08cd5..685b394443 100644 --- a/modules/input/gtkimcontextxim.h +++ b/modules/input/gtkimcontextxim.h @@ -23,10 +23,7 @@ #include #include "x11/gdkx.h" -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - +G_BEGIN_DECLS extern GType gtk_type_im_context_xim; @@ -51,9 +48,7 @@ GtkIMContext *gtk_im_context_xim_new (void); void gtk_im_context_xim_shutdown (void); -#ifdef __cplusplus -} -#endif /* __cplusplus */ +G_END_DECLS #endif /* __GTK_IM_CONTEXT_XIM_H__ */