diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2009-01-25 03:38:27 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2009-01-25 03:38:27 +0000 |
commit | b9905c8fb53bc2875ede3512c1b4fb4dab2a62be (patch) | |
tree | 67803bc7ba9dfd8477a4415eda54fcf2519949ba | |
parent | 08b4777ae60a22d5dd8724c3c493d73dee51aea0 (diff) | |
download | gdk-pixbuf-b9905c8fb53bc2875ede3512c1b4fb4dab2a62be.tar.gz |
Revert changes for bug 567124. Instead of trying to avoid
setting up the im context before the widget is realized, just
reset it when the client window is set.
* gtk/gtkimmulticontext.c: Reset the slave when a client window
is set.
* gtk/gtkimmodule.c
* gtk/gtktextview.c: Revert changes for bug 567124.
svn path=/trunk/; revision=22214
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | gtk/gtkimmodule.c | 3 | ||||
-rw-r--r-- | gtk/gtkimmulticontext.c | 8 | ||||
-rw-r--r-- | gtk/gtktextview.c | 5 |
4 files changed, 16 insertions, 12 deletions
@@ -1,3 +1,15 @@ +2009-01-24 Matthias Clasen <mclasen@redhat.com> + + Revert changes for bug 567124. Instead of trying to avoid + setting up the im context before the widget is realized, just + reset it when the client window is set. + + * gtk/gtkimmulticontext.c: Reset the slave when a client window + is set. + + * gtk/gtkimmodule.c + * gtk/gtktextview.c: Revert changes for bug 567124. + 2009-01-25 Claudio Saavedra <csaavedra@igalia.com> * gtk/gtktreeview.c: Use gtk-doc syntax to refer to properties in diff --git a/gtk/gtkimmodule.c b/gtk/gtkimmodule.c index 274166d36..58ed58411 100644 --- a/gtk/gtkimmodule.c +++ b/gtk/gtkimmodule.c @@ -671,9 +671,6 @@ _gtk_im_module_get_default_context_id (GdkWindow *client_window) GdkScreen *screen; GtkSettings *settings; - /* assertion to make sure all of the unexpected invocation is really gone. */ - g_return_val_if_fail (client_window != NULL, SIMPLE_ID); - if (!contexts_hash) gtk_im_module_initialize (); diff --git a/gtk/gtkimmulticontext.c b/gtk/gtkimmulticontext.c index f48fc8466..034582053 100644 --- a/gtk/gtkimmulticontext.c +++ b/gtk/gtkimmulticontext.c @@ -226,7 +226,7 @@ gtk_im_multicontext_get_slave (GtkIMMulticontext *multicontext) if (!multicontext->slave) { GtkIMContext *slave; - + g_free (multicontext->context_id); if (multicontext->priv->context_id) @@ -258,17 +258,13 @@ gtk_im_multicontext_set_client_window (GtkIMContext *context, GdkWindow *window) { GtkIMMulticontext *multicontext = GTK_IM_MULTICONTEXT (context); - GtkIMContext *slave; GdkScreen *screen; GtkSettings *settings; gboolean connected; multicontext->priv->client_window = window; - slave = gtk_im_multicontext_get_slave (multicontext); - - if (slave) - gtk_im_context_set_client_window (slave, window); + gtk_im_multicontext_set_slave (multicontext, NULL, FALSE); if (window == NULL) return; diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 6d281fd5f..fa494140d 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -2076,8 +2076,7 @@ gtk_text_view_update_im_spot_location (GtkTextView *text_view) */ area.width = 0; - if (GTK_WIDGET_REALIZED (text_view)) - gtk_im_context_set_cursor_location (text_view->im_context, &area); + gtk_im_context_set_cursor_location (text_view->im_context, &area); } static gboolean @@ -3840,7 +3839,7 @@ gtk_text_view_realize (GtkWidget *widget) } /* Ensure updating the spot location. */ - gtk_text_view_update_im_spot_location(text_view); + gtk_text_view_update_im_spot_location (text_view); } static void |