diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js index 48fa9a593..c485fd0f9 100644 --- a/js/ui/windowManager.js +++ b/js/ui/windowManager.js @@ -1871,25 +1871,10 @@ var WindowManager = class { if (event.type() !== Clutter.EventType.SCROLL) return Clutter.EVENT_PROPAGATE; - if (event.is_pointer_emulated()) + const direction = event.get_scroll_direction(); + if (direction === Clutter.ScrollDirection.SMOOTH) return Clutter.EVENT_PROPAGATE; - let direction = event.get_scroll_direction(); - if (direction === Clutter.ScrollDirection.SMOOTH) { - const [dx, dy] = event.get_scroll_delta(); - if (Math.abs(dx) > Math.abs(dy)) { - direction = dx < 0 - ? Clutter.ScrollDirection.LEFT - : Clutter.ScrollDirection.RIGHT; - } else if (Math.abs(dy) > Math.abs(dx)) { - direction = dy < 0 - ? Clutter.ScrollDirection.UP - : Clutter.ScrollDirection.DOWN; - } else { - return Clutter.EVENT_PROPAGATE; - } - } - const workspaceManager = global.workspace_manager; const vertical = workspaceManager.layout_rows === -1; const rtl = Clutter.get_default_text_direction() === Clutter.TextDirection.RTL;