X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=hildon%2Fhildon-app-menu.c;h=73ab87d13fd95f5c91219ed2f04f3bfac47e3aa3;hb=96da05c9d522841cd1e325f2d402294836f8d296;hp=fa39c89d4161813c6e0fbeae8c31c41becaebc9c;hpb=e507a3c273487ead484fa0e3d8c20bb50a41bece;p=hildon diff --git a/hildon/hildon-app-menu.c b/hildon/hildon-app-menu.c index fa39c89..73ab87d 100644 --- a/hildon/hildon-app-menu.c +++ b/hildon/hildon-app-menu.c @@ -523,6 +523,17 @@ hildon_app_menu_map (GtkWidget *widget) priv->find_intruder_idle_id = gdk_threads_add_idle (hildon_app_menu_find_intruder, widget); } +static void +hildon_app_menu_grab_notify (GtkWidget *widget, + gboolean was_grabbed) +{ + if (GTK_WIDGET_CLASS (hildon_app_menu_parent_class)->grab_notify) + GTK_WIDGET_CLASS (hildon_app_menu_parent_class)->grab_notify (widget, was_grabbed); + + if (!was_grabbed && GTK_WIDGET_VISIBLE (widget)) + gtk_widget_hide (widget); +} + static gboolean hildon_app_menu_hide_idle (gpointer widget) { @@ -787,6 +798,8 @@ hildon_app_menu_repack_items (HildonAppMenu *menu, } } } + + gtk_widget_queue_draw (GTK_WIDGET (menu)); } /** @@ -956,6 +969,7 @@ hildon_app_menu_class_init (HildonAppMenuClass *klass) widget_class->map = hildon_app_menu_map; widget_class->realize = hildon_app_menu_realize; widget_class->unrealize = hildon_app_menu_unrealize; + widget_class->grab_notify = hildon_app_menu_grab_notify; widget_class->key_press_event = hildon_app_menu_key_press; widget_class->style_set = hildon_app_menu_style_set; widget_class->delete_event = hildon_app_menu_delete_event_handler;