Revert "workspacesView/workspacesDisplay: Ignore emulated events"
Quoting the commit message here:
In mutter, there are two types of scroll events: discrete scroll events and continuous scroll events. For discrete scroll events, mutter uses a fixed scroll distance (DISCRETE_SCROLL_STEP = 10). For continuous scroll events, the scroll distance is already included, in the dx and dy values. When a scroll event is emitted, mutter pushes two events for each scroll event: an emulated one and a non-emulated one. For discrete scroll events this means, an emulated scroll event with the direction 'SMOOTH' is emitted and a non emulated scroll event with one of the directions 'UP', DOWN', 'LEFT', 'RIGHT' is emitted. For continuous scroll events this means, a non-emulated scroll event with the direction 'SMOOTH' is emitted and under circumstances an emulated scroll event with one of the directions 'UP', 'DOWN', 'LEFT', 'RIGHT' is emitted. The circumstance here for this is that the total amount of scroll distances is that the dx or dy value surpasses the DISCRETE_SCROLL_STEP value. This means that events with the direction 'UP', DOWN', 'LEFT' or 'RIGHT' are not handled twice which was the convern in , as 'SMOOTH' events are already always ignored in the workspacesView (). The other concern in the commit message was, that events, while natural scrolling is enabled, are not handled correctly due to an unknown scroll direction. Mutter doesn't account the inverse scrolling direction when having natural scrolling enabled (See also check_notify_discrete_scroll () in mutter), which is important and necessary for remote desktop clients, as otherwise the natural scrolling behaviour could be effectively eliminated by having natural scrolling enabled on both server and client side. The scrolling direction is therefore always determined by the client (See also ). With commit 499af2dd812b6dbac81209ccede0b1b3719703ba continuous scrolling events are not considered any more although second events ('SMOOTH' events) are already sorted out, which has the effect that scrolling in the overview was made impossible (broken). Natural scrolling events also don't have an effect as described above, which makes the commit superfluous. Fix scrolling in the overview again by reverting this commit. As described above, there are no downsides to this. See also the comments in https://gitlab.gnome.org/GNOME/mutter/-/issues/1614 : https://gitlab.gnome.org/GNOME/mutter/-/issues/1614#note_1011796 : https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/499af2dd812b6dbac81209ccede0b1b3719703ba/js/ui/workspacesView.js#L765 : https://gitlab.gnome.org/GNOME/gnome-remote-desktop/-/merge_requests/25#note_1003423 This reverts commit 499af2dd812b6dbac81209ccede0b1b3719703ba. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1614