summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Sedov <alex0player@gmail.com>2013-03-15 20:32:13 +0400
committerChristoph Lohmann <20h@r-36.net>2013-04-17 19:26:12 +0200
commitd0309a1a226425c1b8086d7b20a6f4e3dcb06872 (patch)
tree7a7f2edbe351a81a3abd9e2d01bfcb81406e8d20
parent083ea8ecde50314cca961c7596a7ab43fc90223e (diff)
downloadsurf-d0309a1a226425c1b8086d7b20a6f4e3dcb06872.tar.gz
surf-d0309a1a226425c1b8086d7b20a6f4e3dcb06872.tar.bz2
surf-d0309a1a226425c1b8086d7b20a6f4e3dcb06872.zip
Disabling WebKit deletion interface feature by default.
Webkit has an amazing "feature" that shows black outline with cross around some randomly chosen text fields. Its only fucntion is to clear field. It's ugly and gets in the way when trying to actually ready what you've written, so here's a patch to disable it. Signed-off-by: Christoph Lohmann <20h@r-36.net>
-rw-r--r--surf.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/surf.c b/surf.c
index e325126..87116f9 100644
--- a/surf.c
+++ b/surf.c
@@ -106,6 +106,8 @@ static gboolean decidedownload(WebKitWebView *v, WebKitWebFrame *f,
static gboolean decidewindow(WebKitWebView *v, WebKitWebFrame *f,
WebKitNetworkRequest *r, WebKitWebNavigationAction *n,
WebKitWebPolicyDecision *p, Client *c);
+static gboolean deletion_interface(WebKitWebView *view,
+ WebKitDOMHTMLElement *arg1, Client *c);
static void destroyclient(Client *c);
static void destroywin(GtkWidget* w, Client *c);
static void die(const char *errstr, ...);
@@ -386,6 +388,12 @@ decidewindow(WebKitWebView *view, WebKitWebFrame *f, WebKitNetworkRequest *r,
return FALSE;
}
+static gboolean
+deletion_interface(WebKitWebView *view,
+ WebKitDOMHTMLElement *arg1, Client *c) {
+ return FALSE;
+}
+
static void
destroyclient(Client *c) {
Client *p;
@@ -715,6 +723,9 @@ newclient(void) {
g_signal_connect(G_OBJECT(c->view),
"resource-request-starting",
G_CALLBACK(beforerequest), c);
+ g_signal_connect(G_OBJECT(c->view),
+ "should-show-delete-interface-for-element",
+ G_CALLBACK(deletion_interface), c);
/* Scrolled Window */
c->scroll = gtk_scrolled_window_new(NULL, NULL);