X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gtk%2Fgtkmnemonichash.c;h=845119f590d2ab4b8341f7016e56f2e1d2c88dee;hb=dc331ccb171151d737112d8dc55b25709271d2c7;hp=6258f8aed070347c257eff4970ba8d1c7ad93fa0;hpb=fce9c8b7d45145c4556650843218e0b76c065c18;p=~andy%2Fgtk diff --git a/gtk/gtkmnemonichash.c b/gtk/gtkmnemonichash.c index 6258f8aed..845119f59 100644 --- a/gtk/gtkmnemonichash.c +++ b/gtk/gtkmnemonichash.c @@ -1,6 +1,6 @@ /* gtkmnemonichash.c: Sets of mnemonics with cycling * - * GTK - The GTK+ Toolkit + * GTK - The GIMP Toolkit * Copyright (C) 2002, Red Hat Inc. * * This library is free software; you can redistribute it and/or @@ -14,13 +14,10 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ #include "gtkmnemonichash.h" -#include "gtkalias.h" struct _GtkMnemnonicHash { @@ -114,6 +111,7 @@ _gtk_mnemonic_hash_activate (GtkMnemonicHash *mnemonic_hash, { GSList *list, *targets; GtkWidget *widget, *chosen_widget; + GdkWindow *window; gboolean overloaded; targets = g_hash_table_lookup (mnemonic_hash->hash, @@ -126,11 +124,11 @@ _gtk_mnemonic_hash_activate (GtkMnemonicHash *mnemonic_hash, for (list = targets; list; list = list->next) { widget = GTK_WIDGET (list->data); - - if (GTK_WIDGET_IS_SENSITIVE (widget) && - GTK_WIDGET_MAPPED (widget) && - widget->window && - gdk_window_is_viewable (widget->window)) + window = gtk_widget_get_window (widget); + + if (gtk_widget_is_sensitive (widget) && + gtk_widget_get_mapped (widget) && + window && gdk_window_is_viewable (window)) { if (chosen_widget) {