Forward axis relative direction to Wayland clients.
Libinput reports natural scrolling via AxisRelativeDirection. Qt sets QWheelEvent::inverted() from wl_pointer.axis_relative_direction. COSMIC was forwarding axis values but not the direction hint. Tested on Fedora 44 COSMIC Wayland with Telegram Desktop (native Wayland), natural scrolling enabled — horizontal touchpad swipes fixed. Assisted-by: AI (root-cause analysis) Signed-off-by: Erik <erik-balfe@users.noreply.github.com>
This commit is contained in:
parent
a69d8d2dba
commit
7ee78d9c13
1 changed files with 10 additions and 2 deletions
|
|
@ -1003,6 +1003,10 @@ impl State {
|
||||||
if let Some(horizontal_amount) = event.amount(Axis::Horizontal) {
|
if let Some(horizontal_amount) = event.amount(Axis::Horizontal) {
|
||||||
if horizontal_amount != 0.0 {
|
if horizontal_amount != 0.0 {
|
||||||
frame = frame
|
frame = frame
|
||||||
|
.relative_direction(
|
||||||
|
Axis::Horizontal,
|
||||||
|
event.relative_direction(Axis::Horizontal),
|
||||||
|
)
|
||||||
.value(Axis::Horizontal, scroll_factor * horizontal_amount);
|
.value(Axis::Horizontal, scroll_factor * horizontal_amount);
|
||||||
if let Some(discrete) = event.amount_v120(Axis::Horizontal) {
|
if let Some(discrete) = event.amount_v120(Axis::Horizontal) {
|
||||||
frame = frame.v120(
|
frame = frame.v120(
|
||||||
|
|
@ -1016,8 +1020,12 @@ impl State {
|
||||||
}
|
}
|
||||||
if let Some(vertical_amount) = event.amount(Axis::Vertical) {
|
if let Some(vertical_amount) = event.amount(Axis::Vertical) {
|
||||||
if vertical_amount != 0.0 {
|
if vertical_amount != 0.0 {
|
||||||
frame =
|
frame = frame
|
||||||
frame.value(Axis::Vertical, scroll_factor * vertical_amount);
|
.relative_direction(
|
||||||
|
Axis::Vertical,
|
||||||
|
event.relative_direction(Axis::Vertical),
|
||||||
|
)
|
||||||
|
.value(Axis::Vertical, scroll_factor * vertical_amount);
|
||||||
if let Some(discrete) = event.amount_v120(Axis::Vertical) {
|
if let Some(discrete) = event.amount_v120(Axis::Vertical) {
|
||||||
frame = frame.v120(
|
frame = frame.v120(
|
||||||
Axis::Vertical,
|
Axis::Vertical,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue