summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2011-05-22 21:56:23 +0200
committerportix <portix@gmx.net>2011-05-22 21:56:23 +0200
commita77a9764dc8c04f6efe87e16c17f543caed343a6 (patch)
tree3702a426fcd148dbc9e219ad1204ad770146461c /src
parent1559c784d3c46474abdd74fcf69916e572134961 (diff)
downloaddwb-a77a9764dc8c04f6efe87e16c17f543caed343a6.zip
Set default value for flattened frames
Diffstat (limited to 'src')
-rw-r--r--src/commands.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/commands.c b/src/commands.c
index 055a8d13..41fe1f2a 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -411,6 +411,11 @@ dwb_com_scroll(KeyMap *km, Arg *arg) {
else
inc = dwb.misc.scroll_step > 0 ? dwb.misc.scroll_step : gtk_adjustment_get_step_increment(a);
+ /* if gtk_get_step_increment fails and dwb.misc.scroll_step is 0 use a default
+ * value */
+ if (inc == 0)
+ inc = 40;
+
double lower = gtk_adjustment_get_lower(a);
double upper = gtk_adjustment_get_upper(a) - gtk_adjustment_get_page_size(a) + lower;
switch (arg->n) {