diff options
author | Tim Janik <timj@gtk.org> | 1999-01-11 12:22:52 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 1999-01-11 12:22:52 +0000 |
commit | e3ee9e9d7dab56082480e2c77191d00f2e559670 (patch) | |
tree | f4ae947e100784a18c580caca44da31e9a1382da /gtk/gtkwindow.c | |
parent | f3af00f4501d4f019146b1be468fb81723f6da1a (diff) | |
download | gdk-pixbuf-e3ee9e9d7dab56082480e2c77191d00f2e559670.tar.gz |
only pass key events to the focus widget if it is sensitive.
Mon Jan 11 13:18:37 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwindow.c:
(gtk_window_key_release_event):
(gtk_window_key_press_event): only pass key events to the focus widget
if it is sensitive.
* gtk/gtkmenuitem.c (gtk_menu_item_select_timeout): don't popup the
submenu if it isn't sensitive.
(gtk_menu_item_paint): state_type doesn't need to be reset to
GTK_STATE_INSENSITIVE if the widget is insensitive anyways.
* gtk/gtkcontainer.c (gtk_container_real_focus):
* gtk/gtklist.c (gtk_list_focus):
* gtk/gtkmenushell.c (gtk_menu_shell_move_selected):
* gtk/gtknotebook.c (gtk_notebook_focus):
s/GTK_WIDGET_SENSITIVE/GTK_WIDGET_IS_SENSITIVE/ since a widgets
sensitivity is determined through the parent as well,
GTK_WIDGET_SENSITIVE is only of interest inside gtkwidget.c, everywhere
else GTK_WIDGET_IS_SENSITIVE (widget) needs to be used to check for
sensitivity.
* gtk/gtkaccelgroup.c (gtk_accel_group_activate): don't activate
object if it is an insensitive widget.
Diffstat (limited to 'gtk/gtkwindow.c')
-rw-r--r-- | gtk/gtkwindow.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index b4c29219a..21b997fcd 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -1012,7 +1012,7 @@ gtk_window_key_press_event (GtkWidget *widget, handled = FALSE; - if (window->focus_widget) + if (window->focus_widget && GTK_WIDGET_IS_SENSITIVE (window->focus_widget)) { handled = gtk_widget_event (window->focus_widget, (GdkEvent*) event); } @@ -1104,7 +1104,7 @@ gtk_window_key_release_event (GtkWidget *widget, window = GTK_WINDOW (widget); handled = FALSE; - if (window->focus_widget) + if (window->focus_widget && GTK_WIDGET_SENSITIVE (window->focus_widget)) { handled = gtk_widget_event (window->focus_widget, (GdkEvent*) event); } |