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>
This commit is contained in:
Alexander Sedov 2013-03-15 20:32:13 +04:00 committed by Christoph Lohmann
parent 083ea8ecde
commit d0309a1a22

11
surf.c
View File

@ -106,6 +106,8 @@ static gboolean decidedownload(WebKitWebView *v, WebKitWebFrame *f,
static gboolean decidewindow(WebKitWebView *v, WebKitWebFrame *f, static gboolean decidewindow(WebKitWebView *v, WebKitWebFrame *f,
WebKitNetworkRequest *r, WebKitWebNavigationAction *n, WebKitNetworkRequest *r, WebKitWebNavigationAction *n,
WebKitWebPolicyDecision *p, Client *c); WebKitWebPolicyDecision *p, Client *c);
static gboolean deletion_interface(WebKitWebView *view,
WebKitDOMHTMLElement *arg1, Client *c);
static void destroyclient(Client *c); static void destroyclient(Client *c);
static void destroywin(GtkWidget* w, Client *c); static void destroywin(GtkWidget* w, Client *c);
static void die(const char *errstr, ...); static void die(const char *errstr, ...);
@ -386,6 +388,12 @@ decidewindow(WebKitWebView *view, WebKitWebFrame *f, WebKitNetworkRequest *r,
return FALSE; return FALSE;
} }
static gboolean
deletion_interface(WebKitWebView *view,
WebKitDOMHTMLElement *arg1, Client *c) {
return FALSE;
}
static void static void
destroyclient(Client *c) { destroyclient(Client *c) {
Client *p; Client *p;
@ -715,6 +723,9 @@ newclient(void) {
g_signal_connect(G_OBJECT(c->view), g_signal_connect(G_OBJECT(c->view),
"resource-request-starting", "resource-request-starting",
G_CALLBACK(beforerequest), c); G_CALLBACK(beforerequest), c);
g_signal_connect(G_OBJECT(c->view),
"should-show-delete-interface-for-element",
G_CALLBACK(deletion_interface), c);
/* Scrolled Window */ /* Scrolled Window */
c->scroll = gtk_scrolled_window_new(NULL, NULL); c->scroll = gtk_scrolled_window_new(NULL, NULL);