Patch from Yao Zhang fixing reference count leak.

Mon Mar 18 11:55:03 2002  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkimmulticontext.c (gtk_im_multicontext_get_slave):
	Patch from Yao Zhang fixing reference count leak.

	* gtk/gtkentry.c (gtk_entry_key_release): if (entry->editable),
	not if (!entry->editable).
This commit is contained in:
Owen Taylor 2002-03-18 17:49:51 +00:00 committed by Owen Taylor
parent 8aceaa534a
commit aa3d5719b7
8 changed files with 55 additions and 2 deletions

View File

@ -1,3 +1,11 @@
Mon Mar 18 11:55:03 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkimmulticontext.c (gtk_im_multicontext_get_slave):
Patch from Yao Zhang fixing reference count leak.
* gtk/gtkentry.c (gtk_entry_key_release): if (entry->editable),
not if (!entry->editable).
Mon Mar 18 11:09:17 2002 Owen Taylor <otaylor@redhat.com> Mon Mar 18 11:09:17 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_set_override_redirect): * gdk/x11/gdkwindow-x11.c (gdk_window_set_override_redirect):

View File

@ -1,3 +1,11 @@
Mon Mar 18 11:55:03 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkimmulticontext.c (gtk_im_multicontext_get_slave):
Patch from Yao Zhang fixing reference count leak.
* gtk/gtkentry.c (gtk_entry_key_release): if (entry->editable),
not if (!entry->editable).
Mon Mar 18 11:09:17 2002 Owen Taylor <otaylor@redhat.com> Mon Mar 18 11:09:17 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_set_override_redirect): * gdk/x11/gdkwindow-x11.c (gdk_window_set_override_redirect):

View File

@ -1,3 +1,11 @@
Mon Mar 18 11:55:03 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkimmulticontext.c (gtk_im_multicontext_get_slave):
Patch from Yao Zhang fixing reference count leak.
* gtk/gtkentry.c (gtk_entry_key_release): if (entry->editable),
not if (!entry->editable).
Mon Mar 18 11:09:17 2002 Owen Taylor <otaylor@redhat.com> Mon Mar 18 11:09:17 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_set_override_redirect): * gdk/x11/gdkwindow-x11.c (gdk_window_set_override_redirect):

View File

@ -1,3 +1,11 @@
Mon Mar 18 11:55:03 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkimmulticontext.c (gtk_im_multicontext_get_slave):
Patch from Yao Zhang fixing reference count leak.
* gtk/gtkentry.c (gtk_entry_key_release): if (entry->editable),
not if (!entry->editable).
Mon Mar 18 11:09:17 2002 Owen Taylor <otaylor@redhat.com> Mon Mar 18 11:09:17 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_set_override_redirect): * gdk/x11/gdkwindow-x11.c (gdk_window_set_override_redirect):

View File

@ -1,3 +1,11 @@
Mon Mar 18 11:55:03 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkimmulticontext.c (gtk_im_multicontext_get_slave):
Patch from Yao Zhang fixing reference count leak.
* gtk/gtkentry.c (gtk_entry_key_release): if (entry->editable),
not if (!entry->editable).
Mon Mar 18 11:09:17 2002 Owen Taylor <otaylor@redhat.com> Mon Mar 18 11:09:17 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_set_override_redirect): * gdk/x11/gdkwindow-x11.c (gdk_window_set_override_redirect):

View File

@ -1,3 +1,11 @@
Mon Mar 18 11:55:03 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkimmulticontext.c (gtk_im_multicontext_get_slave):
Patch from Yao Zhang fixing reference count leak.
* gtk/gtkentry.c (gtk_entry_key_release): if (entry->editable),
not if (!entry->editable).
Mon Mar 18 11:09:17 2002 Owen Taylor <otaylor@redhat.com> Mon Mar 18 11:09:17 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_set_override_redirect): * gdk/x11/gdkwindow-x11.c (gdk_window_set_override_redirect):

View File

@ -1539,7 +1539,7 @@ gtk_entry_key_release (GtkWidget *widget,
{ {
GtkEntry *entry = GTK_ENTRY (widget); GtkEntry *entry = GTK_ENTRY (widget);
if (!entry->editable) if (entry->editable)
{ {
if (gtk_im_context_filter_keypress (entry->im_context, event)) if (gtk_im_context_filter_keypress (entry->im_context, event))
{ {

View File

@ -217,6 +217,8 @@ gtk_im_multicontext_get_slave (GtkIMMulticontext *multicontext)
{ {
if (!multicontext->slave) if (!multicontext->slave)
{ {
GtkIMContext *slave;
if (!global_context_id) if (!global_context_id)
{ {
const char *locale; const char *locale;
@ -229,7 +231,10 @@ gtk_im_multicontext_get_slave (GtkIMMulticontext *multicontext)
global_context_id = _gtk_im_module_get_default_context_id (locale); global_context_id = _gtk_im_module_get_default_context_id (locale);
} }
gtk_im_multicontext_set_slave (multicontext, _gtk_im_module_create (global_context_id), FALSE); slave = _gtk_im_module_create (global_context_id);
gtk_im_multicontext_set_slave (multicontext, slave, FALSE);
g_object_unref (slave);
multicontext->context_id = global_context_id; multicontext->context_id = global_context_id;
} }