diff options
author | Owen Taylor <otaylor@redhat.com> | 2002-05-17 19:27:53 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2002-05-17 19:27:53 +0000 |
commit | 3fe86a489daac550a65035d60677b839390310ea (patch) | |
tree | f3332227326a20de9286b3287bb6a03cf0cc5abc /gtk | |
parent | 0274195e19cd5da38728374e4d7d6f93ebf568bc (diff) | |
download | gdk-pixbuf-3fe86a489daac550a65035d60677b839390310ea.tar.gz |
Protect against reentrancy problems by emitting ::preedit_changed at the
Fri May 17 14:40:24 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkimmulticontext.c (gtk_im_multicontext_set_slave):
Protect against reentrancy problems by emitting
::preedit_changed at the end, fixing input context
leak. (Yao Zhang)
* modules/input/gtkimcontextxim.c (status_window_free):
Patch from Federico Mena Quintero to fix problem where
references to IMContextXIM were kept around after
module was unloaded.
* gtk/gtkdnd.c (gtk_drag_dest_set): NULL initialize
proxy window.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkdnd.c | 2 | ||||
-rw-r--r-- | gtk/gtkimmulticontext.c | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c index aef0ca606..4f86e7f6c 100644 --- a/gtk/gtkdnd.c +++ b/gtk/gtkdnd.c @@ -867,9 +867,9 @@ gtk_drag_dest_set (GtkWidget *widget, site->target_list = gtk_target_list_new (targets, n_targets); else site->target_list = NULL; - site->actions = actions; site->do_proxy = FALSE; + site->proxy_window = NULL; gtk_drag_dest_set_internal (widget, site); } diff --git a/gtk/gtkimmulticontext.c b/gtk/gtkimmulticontext.c index 20796f1e7..8ab0207bd 100644 --- a/gtk/gtkimmulticontext.c +++ b/gtk/gtkimmulticontext.c @@ -157,6 +157,8 @@ gtk_im_multicontext_set_slave (GtkIMMulticontext *multicontext, GtkIMContext *slave, gboolean finalizing) { + gboolean need_preedit_changed = FALSE; + if (multicontext->slave) { if (!finalizing) @@ -179,7 +181,7 @@ gtk_im_multicontext_set_slave (GtkIMMulticontext *multicontext, multicontext->slave = NULL; if (!finalizing) - g_signal_emit_by_name (multicontext, "preedit_changed"); + need_preedit_changed = TRUE; } multicontext->slave = slave; @@ -210,6 +212,9 @@ gtk_im_multicontext_set_slave (GtkIMMulticontext *multicontext, if (multicontext->client_window) gtk_im_context_set_client_window (slave, multicontext->client_window); } + + if (need_preedit_changed) + g_signal_emit_by_name (multicontext, "preedit_changed"); } static GtkIMContext * |