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)
This commit is contained in:
Padraig O'Briain 2002-10-01 09:57:55 +00:00
parent 6b20187e0d
commit 7995a9ef97
7 changed files with 43 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2002-10-01 Padraig O'Briain <padraig.obriain@sun.com>
* gtk/gtkmenu.c: Add gtk_menu_focus() so we do not waste time
trying to focus a menu item. (bug #91258)
2002-09-30 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_impl_win32_finalize):

View File

@ -1,3 +1,8 @@
2002-10-01 Padraig O'Briain <padraig.obriain@sun.com>
* gtk/gtkmenu.c: Add gtk_menu_focus() so we do not waste time
trying to focus a menu item. (bug #91258)
2002-09-30 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_impl_win32_finalize):

View File

@ -1,3 +1,8 @@
2002-10-01 Padraig O'Briain <padraig.obriain@sun.com>
* gtk/gtkmenu.c: Add gtk_menu_focus() so we do not waste time
trying to focus a menu item. (bug #91258)
2002-09-30 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_impl_win32_finalize):

View File

@ -1,3 +1,8 @@
2002-10-01 Padraig O'Briain <padraig.obriain@sun.com>
* gtk/gtkmenu.c: Add gtk_menu_focus() so we do not waste time
trying to focus a menu item. (bug #91258)
2002-09-30 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_impl_win32_finalize):

View File

@ -1,3 +1,8 @@
2002-10-01 Padraig O'Briain <padraig.obriain@sun.com>
* gtk/gtkmenu.c: Add gtk_menu_focus() so we do not waste time
trying to focus a menu item. (bug #91258)
2002-09-30 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_impl_win32_finalize):

View File

@ -1,3 +1,8 @@
2002-10-01 Padraig O'Briain <padraig.obriain@sun.com>
* gtk/gtkmenu.c: Add gtk_menu_focus() so we do not waste time
trying to focus a menu item. (bug #91258)
2002-09-30 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_impl_win32_finalize):

View File

@ -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 *