[maemo-commits] [maemo-commits] r12627 - in projects/haf/trunk/gtk+: . gtk
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Tue Jul 3 16:14:10 EEST 2007
- Previous message: [maemo-commits] r12626 - projects/haf/hafbuildbot
- Next message: [maemo-commits] r12628 - in projects/haf/trunk/hildon-desktop: . libhildondesktop src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: xan Date: 2007-07-03 16:13:54 +0300 (Tue, 03 Jul 2007) New Revision: 12627 Modified: projects/haf/trunk/gtk+/ChangeLog projects/haf/trunk/gtk+/gtk/gtkmenushell.c Log: 2007-07-03 Xan Lopez <xan.lopez at nokia.com> * gtk/gtkmenushell.c (_gtk_menu_shell_fake_button_events): When a menu is attached to a menubar the events will be redirected there, so check for it and consider a menubar to be itself the "attached_widget" for the purposes of the fake button press event hack. Modified: projects/haf/trunk/gtk+/ChangeLog =================================================================== --- projects/haf/trunk/gtk+/ChangeLog 2007-07-03 13:00:04 UTC (rev 12626) +++ projects/haf/trunk/gtk+/ChangeLog 2007-07-03 13:13:54 UTC (rev 12627) @@ -1,3 +1,10 @@ +2007-07-03 Xan Lopez <xan.lopez at nokia.com> + + * gtk/gtkmenushell.c (_gtk_menu_shell_fake_button_events): + When a menu is attached to a menubar the events will be redirected + there, so check for it and consider a menubar to be itself the + "attached_widget" for the purposes of the fake button press event hack. + 2007-07-02 Xan Lopez <xan.lopez at nokia.com> * gtk/gtkentrycompletion.c (_gtk_entry_completion_popup), Modified: projects/haf/trunk/gtk+/gtk/gtkmenushell.c =================================================================== --- projects/haf/trunk/gtk+/gtk/gtkmenushell.c 2007-07-03 13:00:04 UTC (rev 12626) +++ projects/haf/trunk/gtk+/gtk/gtkmenushell.c 2007-07-03 13:13:54 UTC (rev 12627) @@ -557,8 +557,17 @@ display = gtk_widget_get_display (widget); - attached_widget = gtk_menu_get_attach_widget (GTK_MENU (widget)); + /* If we are a menu get the widget we are attached to. If we are a + menubar we are ourselves the attach widget in this case. If both + checks fail, just exit */ + if (GTK_IS_MENU (widget)) + attached_widget = gtk_menu_get_attach_widget (GTK_MENU (widget)); + else if (GTK_IS_MENU_BAR (widget)) + attached_widget = widget; + else + return; + /* Blacklist GtkWindow to disable this functionality in HildonWindow, as there is no reliable way of detecting the click on the window decoration */
- Previous message: [maemo-commits] r12626 - projects/haf/hafbuildbot
- Next message: [maemo-commits] r12628 - in projects/haf/trunk/hildon-desktop: . libhildondesktop src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]