Add config option for smooth scrolling activation

This commit is contained in:
Quentin Rameau 2017-05-11 15:33:42 +02:00
parent 93a3e4cda0
commit 4a1876eb80
2 changed files with 6 additions and 0 deletions

View file

@ -32,6 +32,7 @@ static Parameter defconfig[ParameterLast] = {
SETB(ScrollBars, 1), SETB(ScrollBars, 1),
SETB(ShowIndicators, 1), SETB(ShowIndicators, 1),
SETB(SiteQuirks, 1), SETB(SiteQuirks, 1),
SETB(SmoothScrolling, 0),
SETB(SpellChecking, 0), SETB(SpellChecking, 0),
SETV(SpellLanguages, ((char *[]){ "en_US", NULL })), SETV(SpellLanguages, ((char *[]){ "en_US", NULL })),
SETB(StrictTLS, 1), SETB(StrictTLS, 1),

5
surf.c
View file

@ -83,6 +83,7 @@ typedef enum {
ScrollBars, ScrollBars,
ShowIndicators, ShowIndicators,
SiteQuirks, SiteQuirks,
SmoothScrolling,
SpellChecking, SpellChecking,
SpellLanguages, SpellLanguages,
StrictTLS, StrictTLS,
@ -750,6 +751,9 @@ setparameter(Client *c, int refresh, ParamName p, const Arg *a)
return; /* do not update */ return; /* do not update */
case ShowIndicators: case ShowIndicators:
break; break;
case SmoothScrolling:
webkit_settings_set_enable_smooth_scrolling(s, a->b);
return; /* do not update */
case SiteQuirks: case SiteQuirks:
webkit_settings_set_enable_site_specific_quirks(s, a->b); webkit_settings_set_enable_site_specific_quirks(s, a->b);
break; break;
@ -1029,6 +1033,7 @@ newview(Client *c, WebKitWebView *rv)
"enable-plugins", curconfig[Plugins].val.b, "enable-plugins", curconfig[Plugins].val.b,
"enable-accelerated-2d-canvas", curconfig[AcceleratedCanvas].val.b, "enable-accelerated-2d-canvas", curconfig[AcceleratedCanvas].val.b,
"enable-site-specific-quirks", curconfig[SiteQuirks].val.b, "enable-site-specific-quirks", curconfig[SiteQuirks].val.b,
"enable-smooth-scrolling", curconfig[SmoothScrolling].val.b,
"media-playback-requires-user-gesture", curconfig[MediaManualPlay].val.b, "media-playback-requires-user-gesture", curconfig[MediaManualPlay].val.b,
NULL); NULL);
/* For more interesting settings, have a look at /* For more interesting settings, have a look at