summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorPadraig O'Briain <padraigo@src.gnome.org>2002-10-01 09:57:55 +0000
committerPadraig O'Briain <padraigo@src.gnome.org>2002-10-01 09:57:55 +0000
commit7995a9ef97d6bcac5693b1faf6d5bd7d0356a771 (patch)
tree7e5721b73bb0804c121da742cc8292c19a9a295b /gtk
parent6b20187e0ddb3b9783ad23b2d42c3adcf3ab0ba9 (diff)
downloadgtk+-7995a9ef97d6bcac5693b1faf6d5bd7d0356a771.tar.gz
Add gtk_menu_focus() so we do not waste time trying to focus a menu item.
* gtk/gtkmenu.c: Add gtk_menu_focus() so we do not waste time trying to focus a menu item. (bug #91258)
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkmenu.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index d2ff193052..28bbcc0993 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -123,6 +123,8 @@ static void gtk_menu_set_tearoff_hints (GtkMenu *menu,
gint width);
static void gtk_menu_style_set (GtkWidget *widget,
GtkStyle *previous_style);
+static gboolean gtk_menu_focus (GtkWidget *widget,
+ GtkDirectionType direction);
static void gtk_menu_stop_navigating_submenu (GtkMenu *menu);
@@ -241,6 +243,7 @@ gtk_menu_class_init (GtkMenuClass *class)
widget_class->enter_notify_event = gtk_menu_enter_notify;
widget_class->leave_notify_event = gtk_menu_leave_notify;
widget_class->style_set = gtk_menu_style_set;
+ widget_class->focus = gtk_menu_focus;
container_class->remove = gtk_menu_remove;
@@ -1409,6 +1412,16 @@ gtk_menu_realize (GtkWidget *widget)
gdk_window_show (menu->view_window);
}
+static gboolean
+gtk_menu_focus (GtkWidget *widget,
+ GtkDirectionType direction)
+{
+ /*
+ * A menu or its menu items cannot have focus
+ */
+ return FALSE;
+}
+
/* See notes in gtk_menu_popup() for information about the "grab transfer window"
*/
static GdkWindow *