Skip to content

Commit eafc411

Browse files
committed
gwl: Ignore 'smooth' scroll events when scrolling.
Clutter now sends two events when scrolling - each time the user scrolls, an event with Clutter.ScrollDirection.SMOOTH is fired, followed by Clutter.ScrollDirection.[UP|DOWN]. ref: linuxmint/mint21-beta#11 linuxmint/mint21-beta#12
1 parent 064055f commit eafc411

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

files/usr/share/cinnamon/applets/[email protected]/applet.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const Clutter = imports.gi.Clutter;
12
const Gio = imports.gi.Gio;
23
const Gtk = imports.gi.Gtk;
34
const GLib = imports.gi.GLib;
@@ -679,6 +680,9 @@ class GroupedWindowListApplet extends Applet.Applet {
679680
}
680681

681682
handleScroll(e, sourceFromAppGroup) {
683+
if (e?.get_scroll_direction() == Clutter.ScrollDirection.SMOOTH)
684+
return;
685+
682686
if( (this.state.settings.thumbnailScrollBehavior) || (this.state.settings.scrollBehavior === 2) ||
683687
(this.state.settings.leftClickAction === 3 && this.state.settings.scrollBehavior !== 3
684688
&& !e && sourceFromAppGroup) ||

0 commit comments

Comments
 (0)