aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorAlp Toker <atoker@src.gnome.org>2008-06-17 21:31:56 +0800
committerAlp Toker <atoker@src.gnome.org>2008-06-17 21:31:56 +0800
commit6b624c65e1394a72ae33e3d29b2b990943eb24a4 (patch)
treebafba7cc8335cdd9a56d0d52a1a1cf85cf68aeac /embed
parent56a66d5199051672a5887c0120a86f14a463dba7 (diff)
downloadgsoc2013-epiphany-6b624c65e1394a72ae33e3d29b2b990943eb24a4.tar
gsoc2013-epiphany-6b624c65e1394a72ae33e3d29b2b990943eb24a4.tar.gz
gsoc2013-epiphany-6b624c65e1394a72ae33e3d29b2b990943eb24a4.tar.bz2
gsoc2013-epiphany-6b624c65e1394a72ae33e3d29b2b990943eb24a4.tar.lz
gsoc2013-epiphany-6b624c65e1394a72ae33e3d29b2b990943eb24a4.tar.xz
gsoc2013-epiphany-6b624c65e1394a72ae33e3d29b2b990943eb24a4.tar.zst
gsoc2013-epiphany-6b624c65e1394a72ae33e3d29b2b990943eb24a4.zip
Apply clamping for pixel scroll
svn path=/trunk/; revision=8283
Diffstat (limited to 'embed')
-rw-r--r--embed/webkit/webkit-embed.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/embed/webkit/webkit-embed.c b/embed/webkit/webkit-embed.c
index f5d622fee..9638d5c8f 100644
--- a/embed/webkit/webkit-embed.c
+++ b/embed/webkit/webkit-embed.c
@@ -475,11 +475,8 @@ impl_scroll_pixels (EphyEmbed *embed,
hadj = gtk_scrolled_window_get_hadjustment (wembed->priv->scrolled_window);
vadj = gtk_scrolled_window_get_vadjustment (wembed->priv->scrolled_window);
- hadj->value += dx;
- vadj->value += dy;
-
- gtk_adjustment_value_changed (hadj);
- gtk_adjustment_value_changed (vadj);
+ gtk_adjustment_set_value (hadj, CLAMP (hadj->value + dx, hadj->lower, hadj->upper - hadj->page_size));
+ gtk_adjustment_set_value (vadj, CLAMP (vadj->value + dy, vadj->lower, vadj->upper - vadj->page_size));
}
static void