utmapp / utmapp/UTM

What is the status on smooth scrolling on MacOS host with an Ubuntu guest?

Open
#7,067 8 comments 2 reactions 0 assignees View on GitHub
spice
Dominant language
Swift
Stars
35.5k
Forks
1.8k
Avg merge
5d 5h
Merged PRs (30d)
7

Description

**Describe the issue**
When using a trackpad for scrolling, a "scroll down" event is only received (watching with `xev`) after some amount of scrolling.
This means that a small amount of scroll is ignored.
And that significant movement is required to scroll.
And that scrolling is jerky, as it moves in increments of "scroll down by 3 lines".

This has been an issue for many years. I'd like to take initiative upstream if necessary.
Where is the problem? Is the problem with spice / x11 / wayland / libinput / UTM / qemu ... ?
Any details would be appreciated.

The code already has some implementation for smooth scrolling in UTM for the iOS app:
```
- (CGPoint)moveMouseScroll:(CGPoint)translation {
translation.y = CGPointToPixel(translation.y) / kScrollSpeedReduction;
if (self.isInvertScroll) {
translation.y = -translation.y;
}
[self.vmInput sendMouseScroll:kCSInputScrollSmooth button:self.mouseButtonDown dy:translation.y];
return translation;
}
```

the MacOS code has this line, but it's unclear to me if `.smooth` is ever set? I don't read Swift code.
```
func mouseScroll(dy: CGFloat, button: CSInputButton) {
let scrollDy = isInvertScroll ? -dy : dy
vmInput?.sendMouseScroll(.smooth, button: button, dy: scrollDy)
}
```

A workaround would be to send more "scroll down" events and intercept them on the Linux side with a smaller 'scroll down' increment.

Can you say more about the issue, how you are stuck, and if you have tried resolving this upstream?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.