aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo Noronha Silva <gns@gnome.org>2009-12-14 19:24:42 +0800
committerGustavo Noronha Silva <gns@gnome.org>2009-12-14 19:26:10 +0800
commita31c25320318115914e009048a4081b2a1b58f50 (patch)
tree37eb2433db408ed0e02b64febd2ab5927324bd96
parent27d6a609d43ec2e6a7a5ee27809a79263af089ad (diff)
downloadgsoc2013-epiphany-a31c25320318115914e009048a4081b2a1b58f50.tar
gsoc2013-epiphany-a31c25320318115914e009048a4081b2a1b58f50.tar.gz
gsoc2013-epiphany-a31c25320318115914e009048a4081b2a1b58f50.tar.bz2
gsoc2013-epiphany-a31c25320318115914e009048a4081b2a1b58f50.tar.lz
gsoc2013-epiphany-a31c25320318115914e009048a4081b2a1b58f50.tar.xz
gsoc2013-epiphany-a31c25320318115914e009048a4081b2a1b58f50.tar.zst
gsoc2013-epiphany-a31c25320318115914e009048a4081b2a1b58f50.zip
Let web pages handle mouse clicks before doing our own handling
This allows applications to provide their own context menus, and perform their own handling for right-click events. Bug #603326
-rw-r--r--embed/ephy-embed-prefs.c5
-rw-r--r--src/ephy-window.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/embed/ephy-embed-prefs.c b/embed/ephy-embed-prefs.c
index a7465db10..82885faf1 100644
--- a/embed/ephy-embed-prefs.c
+++ b/embed/ephy-embed-prefs.c
@@ -251,7 +251,10 @@ ephy_embed_prefs_init (void)
settings = webkit_web_settings_new ();
/* Hardcoded settings */
- g_object_set (settings, "auto-shrink-images", FALSE, NULL);
+ g_object_set (settings,
+ "auto-shrink-images", FALSE,
+ "enable-default-context-menu", FALSE,
+ NULL);
/* Connections */
connections = g_malloc (sizeof (guint) * G_N_ELEMENTS (webkit_pref_entries));
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 0f2ceed43..2780aaed0 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -2862,9 +2862,14 @@ ephy_window_set_active_tab (EphyWindow *window, EphyEmbed *new_embed)
g_signal_connect_object (view, "notify::progress",
G_CALLBACK (sync_tab_load_progress),
window, 0);
+ /* We run our button-press-event after the default
+ * handler to make sure pages have a chance to perform
+ * their own handling - for instance, have their own
+ * context menus, or provide specific functionality
+ * for the right mouse button */
g_signal_connect_object (view, "button-press-event",
G_CALLBACK (ephy_window_dom_mouse_click_cb),
- window, 0);
+ window, G_CONNECT_AFTER);
g_signal_connect_object (view, "notify::visibility",
G_CALLBACK (ephy_window_visibility_cb),
window, 0);