Bug 568552 – gtk_combo + gtk entry in invisible mode takes 100% cpu

* gtk/gtkentry.c: Fix an expose loop caused by raising windows out
        of an expose handler. Also, don't show the 'Caps Lock' warning for
        activated input methods, since that makes it permanently shown
        for some locales. It should not be that necessary, now that we
        do show preedit text even in password entries. Pointed out by
        Frederic Crozat.


svn path=/trunk/; revision=22164
This commit is contained in:
Matthias Clasen 2009-01-21 20:09:49 +00:00
parent c6f4b327e6
commit 579f457c78
2 changed files with 20 additions and 18 deletions

View File

@ -1,3 +1,14 @@
2009-01-21 Matthias Clasen <mclasen@redhat.com>
Bug 568552 gtk_combo + gtk entry in invisible mode takes 100% cpu
* gtk/gtkentry.c: Fix an expose loop caused by raising windows out
of an expose handler. Also, don't show the 'Caps Lock' warning for
activated input methods, since that makes it permanently shown
for some locales. It should not be that necessary, now that we
do show preedit text even in password entries. Pointed out by
Frederic Crozat.
2009-01-21 Federico Mena Quintero <federico@novell.com>
* gtk/gtkfilechooserdefault.c (save_widgets_create): Set
@ -6,6 +17,7 @@
exists.
2009-01-21 Marek Kasik <mkasik@redhat.com>
Bug 561801 - "scheduled printing" doesn't function as expected
* gtk/gtkprintunixdialog: Add tooltip.

View File

@ -799,8 +799,7 @@ gtk_entry_class_init (GtkEntryClass *class)
/**
* GtkEntry:caps-lock-warning
*
* Whether password entries will show a warning when Caps Lock is on
* or an input method is active.
* Whether password entries will show a warning when Caps Lock is on.
*
* Note that the warning is shown using a secondary icon, and thus
* does not work if you are using the secondary icon position for some
@ -812,7 +811,7 @@ gtk_entry_class_init (GtkEntryClass *class)
PROP_CAPS_LOCK_WARNING,
g_param_spec_boolean ("caps-lock-warning",
P_("Caps Lock warning"),
P_("Whether password entries will show a warning when Caps Lock is on or an input method is active"),
P_("Whether password entries will show a warning when Caps Lock is on"),
TRUE,
GTK_PARAM_READWRITE));
@ -2434,7 +2433,7 @@ update_cursors (GtkWidget *widget)
if ((icon_info = priv->icons[i]) != NULL)
{
if (icon_info->pixbuf != NULL)
gdk_window_show (icon_info->window);
gdk_window_show_unraised (icon_info->window);
/* The icon windows are not children of the visible entry window,
* thus we can't just inherit the xterm cursor. Slight complication
@ -2515,7 +2514,7 @@ construct_icon_info (GtkWidget *widget,
realize_icon_info (widget, icon_pos);
if (GTK_WIDGET_MAPPED (widget))
gdk_window_show (icon_info->window);
gdk_window_show_unraised (icon_info->window);
return icon_info;
}
@ -6306,8 +6305,8 @@ gtk_entry_ensure_pixbuf (GtkEntry *entry,
break;
}
if (GDK_IS_WINDOW (icon_info->window))
gdk_window_show (icon_info->window);
if (icon_info->pixbuf != NULL)
gdk_window_show_unraised (icon_info->window);
}
@ -9598,17 +9597,8 @@ keymap_state_changed (GdkKeymap *keymap,
if (!entry->visible && priv->caps_lock_warning)
{
gboolean capslock_on;
gboolean im_on;
capslock_on = gdk_keymap_get_caps_lock_state (keymap);
im_on = g_strcmp0 (gtk_im_multicontext_get_context_id (GTK_IM_MULTICONTEXT (entry->im_context)), "gtk-im-context-simple") != 0;
if (capslock_on && im_on)
text = _("You have the Caps Lock key on\nand an active input method");
else if (capslock_on)
if (gdk_keymap_get_caps_lock_state (keymap))
text = _("You have the Caps Lock key on");
else if (im_on)
text = _("You have an active input method");
}
if (text)