aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Saavedra <csaavedra@igalia.com>2013-09-09 15:23:48 +0800
committerClaudio Saavedra <csaavedra@igalia.com>2013-09-09 15:26:13 +0800
commitb6602f5c5b2bef6862c103e781a3be6a76749ba3 (patch)
tree7344e44e9734c2239260c2bc9db5c1c34c9e37ee
parent030d8569b212e65ad6f93d6f7f09a06972172202 (diff)
downloadgsoc2013-epiphany-b6602f5c5b2bef6862c103e781a3be6a76749ba3.tar
gsoc2013-epiphany-b6602f5c5b2bef6862c103e781a3be6a76749ba3.tar.gz
gsoc2013-epiphany-b6602f5c5b2bef6862c103e781a3be6a76749ba3.tar.bz2
gsoc2013-epiphany-b6602f5c5b2bef6862c103e781a3be6a76749ba3.tar.lz
gsoc2013-epiphany-b6602f5c5b2bef6862c103e781a3be6a76749ba3.tar.xz
gsoc2013-epiphany-b6602f5c5b2bef6862c103e781a3be6a76749ba3.tar.zst
gsoc2013-epiphany-b6602f5c5b2bef6862c103e781a3be6a76749ba3.zip
actions: fix return value for button press events that pop up menus
Otherwise the GTK+ will pop up the menu from the WM actions. https://bugzilla.gnome.org/show_bug.cgi?id=707721
-rw-r--r--src/ephy-navigation-history-action.c7
-rw-r--r--src/ephy-page-menu-action.c6
2 files changed, 8 insertions, 5 deletions
diff --git a/src/ephy-navigation-history-action.c b/src/ephy-navigation-history-action.c
index dec229011..4f7f1c90e 100644
--- a/src/ephy-navigation-history-action.c
+++ b/src/ephy-navigation-history-action.c
@@ -651,10 +651,11 @@ tool_button_press_event_cb (GtkButton *button,
(GSourceFunc) menu_timeout_cb,
data,
(GDestroyNotify) g_free);
- } else if (event->button == 3)
+ return FALSE;
+ } else if (event->button == 3) {
popup_history_menu (action, GTK_WIDGET (button), event);
-
- return FALSE;
+ return TRUE;
+ }
}
static gboolean
diff --git a/src/ephy-page-menu-action.c b/src/ephy-page-menu-action.c
index e50ceab2d..2b68708cf 100644
--- a/src/ephy-page-menu-action.c
+++ b/src/ephy-page-menu-action.c
@@ -76,7 +76,7 @@ visible_cb (GtkWidget *menu, GParamSpec *pspec, GtkWidget *button)
"active-menu");
}
-static void
+static gboolean
button_press_cb (GtkWidget *button, GdkEventButton *event, EphyPageMenuAction *action)
{
GtkWidget *menu;
@@ -91,7 +91,7 @@ button_press_cb (GtkWidget *button, GdkEventButton *event, EphyPageMenuAction *a
button = GTK_WIDGET (l->data);
}
- g_return_if_fail (GTK_IS_BUTTON (button));
+ g_return_val_if_fail (GTK_IS_BUTTON (button), FALSE);
if (!action->priv->menu) {
window = ephy_window_action_get_window (EPHY_WINDOW_ACTION (action));
@@ -114,6 +114,8 @@ button_press_cb (GtkWidget *button, GdkEventButton *event, EphyPageMenuAction *a
NULL, NULL,
(GtkMenuPositionFunc)menu_position_func, button,
event_button, event_time);
+
+ return TRUE;
}
static void