lxde / lxpanel

Other
52 stars 38 forks source link

Volume plugin: strange scroll behaviour #27

Open martenwa opened 3 years ago

martenwa commented 3 years ago

I experience unexpected behaviour in the volume plugin wrt mouse scrolling (lxpanel-0.10.1). No matter which direction I scroll, it decreases the volume.

I have localised the issue to lines 797--800 in plugins/volumealsa/volumealsa.c, and it stems from the incorrect assumption that a GdkEventScroll that is neither GDK_SCROLL_UP nor GDK_SCROLL_LEFT must be either GDK_SCROLL_DOWN or GDK_SCROLL_RIGHT. However, my scroll wheel generates GDK_SCROLL_SMOOTH, and in order to determine the direction one needs to consider delta_y (see https://developer.gnome.org/gdk3/stable/gdk3-Events.html#gdk-event-get-scroll-deltas). I attach a crude approximation of a patch for the issue, that at least solves the problem for me.

lxpanel-0.10.1-volume-plugin-fix-mouse-scrolling.patch.txt