surf-scrollmultiply-2.0.diff (1304B)
1 diff -up surf-2.0/surf.c surf/surf.c 2 --- surf-2.0/surf.c 2018-04-13 10:55:11.036959113 +0200 3 +++ surf/surf.c 2018-04-14 12:12:41.519989478 +0200 4 @@ -179,6 +179,8 @@ static void initwebextensions(WebKitWebC 5 static GtkWidget *createview(WebKitWebView *v, WebKitNavigationAction *a, 6 Client *c); 7 static gboolean buttonreleased(GtkWidget *w, GdkEvent *e, Client *c); 8 +static gboolean scrollmultiply(GtkWidget *w, GdkEvent *e, Client *c); 9 + 10 static GdkFilterReturn processx(GdkXEvent *xevent, GdkEvent *event, 11 gpointer d); 12 static gboolean winevent(GtkWidget *w, GdkEvent *e, Client *c); 13 @@ -1152,6 +1154,8 @@ newview(Client *c, WebKitWebView *rv) 14 G_CALLBACK(titlechanged), c); 15 g_signal_connect(G_OBJECT(v), "button-release-event", 16 G_CALLBACK(buttonreleased), c); 17 + g_signal_connect(G_OBJECT(v), "scroll-event", 18 + G_CALLBACK(scrollmultiply), c); 19 g_signal_connect(G_OBJECT(v), "close", 20 G_CALLBACK(closeview), c); 21 g_signal_connect(G_OBJECT(v), "create", 22 @@ -1229,6 +1233,13 @@ buttonreleased(GtkWidget *w, GdkEvent *e 23 return FALSE; 24 } 25 26 +gboolean 27 +scrollmultiply(GtkWidget *w, GdkEvent *e, Client *c) 28 +{ 29 + e->scroll.delta_y*=7; 30 + return FALSE; 31 +} 32 + 33 GdkFilterReturn 34 processx(GdkXEvent *e, GdkEvent *event, gpointer d) 35 {