static void on_counted_matches(WebKitFindController *finder, guint count, Client *c);
static gboolean on_permission_request(WebKitWebView *webview,
WebKitPermissionRequest *request, Client *c);
+static gboolean on_scroll(WebKitWebView *webview, GdkEvent *event, Client *c);
static void on_script_message_focus(WebKitUserContentManager *manager,
WebKitJavascriptResult *res, gpointer data);
static gboolean profileOptionArgFunc(const gchar *option_name,
"signal::notify::title", G_CALLBACK(on_webview_notify_title), c,
"signal::notify::uri", G_CALLBACK(on_webview_notify_uri), c,
"signal::permission-request", G_CALLBACK(on_permission_request), c,
+ "signal::scroll-event", G_CALLBACK(on_scroll), c,
"signal::ready-to-show", G_CALLBACK(on_webview_ready_to_show), c,
"signal::web-process-crashed", G_CALLBACK(on_webview_web_process_crashed), c,
"signal::authenticate", G_CALLBACK(on_webview_authenticate), c,
return TRUE;
}
+static gboolean on_scroll(WebKitWebView *webview, GdkEvent *event, Client *c)
+{
+ event->scroll.delta_y *= c->config.scrollmultiplier;
+ return FALSE;
+}
+
static void on_script_message_focus(WebKitUserContentManager *manager,
WebKitJavascriptResult *res, gpointer data)
{
setting_add(c, "cookie-accept", TYPE_CHAR, &"always", cookie_accept, 0, NULL);
i = 40;
setting_add(c, "scroll-step", TYPE_INTEGER, &i, internal, 0, &c->config.scrollstep);
+ i = 1;
+ setting_add(c, "scroll-multiplier", TYPE_INTEGER, &i, internal, 0, &c->config.scrollmultiplier);
setting_add(c, "home-page", TYPE_CHAR, &SETTING_HOME_PAGE, NULL, 0, NULL);
i = 2000;
/* TODO should be global and not overwritten by a new client */