aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2022-07-24 22:47:38 +0200
committerPřemysl Eric Janouch <p@janouch.name>2022-07-24 23:15:18 +0200
commitaa985514a6b29d405209ae97cf54958997d821c4 (patch)
tree46649b6915c6a47a61daa5f62c423ce9e5a30c35 /src
parent6f5e32386ee3105b39043e9720ff0fb4773b3655 (diff)
downloadtdv-aa985514a6b29d405209ae97cf54958997d821c4.tar.gz
tdv-aa985514a6b29d405209ae97cf54958997d821c4.tar.xz
tdv-aa985514a6b29d405209ae97cf54958997d821c4.zip
sdgui: fix up the smooth scrolling commit
Diffstat (limited to 'src')
-rw-r--r--src/stardict-view.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/stardict-view.c b/src/stardict-view.c
index a6f7733..2ac02e0 100644
--- a/src/stardict-view.c
+++ b/src/stardict-view.c
@@ -489,8 +489,9 @@ stardict_view_scroll_event (GtkWidget *widget, GdkEventScroll *event)
{
// On GDK/Wayland, the mouse wheel will typically create 1.5 deltas,
// after dividing a 15 degree click angle from libinput by 10.
+ // (Noticed on Arch + Sway, cannot reproduce on Ubuntu 22.04.)
// On X11, as libinput(4) indicates, the delta will always be 1.0.
- double delta = CLAMP(event->delta_y, -1, +1);
+ double delta = CLAMP (event->delta_y, -1, +1);
stardict_view_scroll (self, GTK_SCROLL_STEPS, 3 * delta);
return TRUE;
}