diff options
-rw-r--r-- | src/tab-chrome.c | 8 | ||||
-rw-r--r-- | src/tab-chrome.h | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c index 42e2a0c..abaf5a2 100644 --- a/src/tab-chrome.c +++ b/src/tab-chrome.c @@ -340,6 +340,7 @@ static void about_clicked_cb(GtkButton __attribute__((unused)) *button, MqTabChrome *chrome) { mq_tab_new("about:", chrome->tab); + gtk_widget_hide(chrome->menu_popover); } static void @@ -372,7 +373,6 @@ menu_button_clicked_cb(GtkToolButton *tool_button, { GtkWidget *grid; GtkWidget *buttons[BUTTON_ROWS * BUTTON_COLS]; - GtkWidget *popover; /* Set up the grid. */ grid = gtk_grid_new(); @@ -402,11 +402,11 @@ menu_button_clicked_cb(GtkToolButton *tool_button, CLICKED_CB(5, 2, quit_clicked_cb); /* Set up the popover. */ - popover = gtk_popover_new(GTK_WIDGET(tool_button)); - gtk_container_add(GTK_CONTAINER(popover), grid); + chrome->menu_popover = gtk_popover_new(GTK_WIDGET(tool_button)); + gtk_container_add(GTK_CONTAINER(chrome->menu_popover), grid); /* NB: gtk_popover_popup() is new in GTK+ 3.22. */ - gtk_widget_show_all(popover); + gtk_widget_show_all(chrome->menu_popover); } #undef BUTTON_ROWS diff --git a/src/tab-chrome.h b/src/tab-chrome.h index 0fa8640..ff9c552 100644 --- a/src/tab-chrome.h +++ b/src/tab-chrome.h @@ -46,6 +46,7 @@ struct MqTabChrome { GtkWidget *back_forward_popover; gint back_items; GtkToolItem *menu_button; + GtkWidget *menu_popover; }; MqTabChrome * |