]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkmnemonichash.c
filechooserbutton: Don't duplicate tests for GTK_RESPONSE_DELETE_EVENT
[~andy/gtk] / gtk / gtkmnemonichash.c
index 6f85d04f6e63d4a194524a256269ba401def97c1..845119f590d2ab4b8341f7016e56f2e1d2c88dee 100644 (file)
@@ -14,9 +14,7 @@
  * 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 <http://www.gnu.org/licenses/>.
  */
 
 #include "gtkmnemonichash.h"
@@ -113,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,
@@ -125,11 +124,11 @@ _gtk_mnemonic_hash_activate (GtkMnemonicHash *mnemonic_hash,
   for (list = targets; list; list = list->next)
     {
       widget = GTK_WIDGET (list->data);
-      
+      window = gtk_widget_get_window (widget);
+
       if (gtk_widget_is_sensitive (widget) &&
          gtk_widget_get_mapped (widget) &&
-          widget->window &&
-         gdk_window_is_viewable (widget->window))
+          window && gdk_window_is_viewable (window))
        {
          if (chosen_widget)
            {