Xpra: Ticket #1428: Mouse wheel works only down but not up

This bug report is created based on the following thread:

http://lists.devloop.org.uk/pipermail/shifter-users/2017-February/001852.html

With Xpra 1.0 client under Windows 10 the xpra client does not transmit messages for mouse wheel "up" but it does so for mouse wheel "down". When testing with xev, scrolling down displays the following messages:

ButtonPress event, serial 36, synthetic NO, window 0xc00001,
    root 0x25d, subw 0x0, time 1389734833, (177,154), root:(445,445),
    state 0x0, button 5, same_screen YES
ButtonRelease event, serial 36, synthetic NO, window 0xc00001,
    root 0x25d, subw 0x0, time 1389734833, (177,154), root:(445,445),
    state 0x1000, button 5, same_screen YES

whereas scrolling up generates none.

The problem is on the Windows xpra client because when using an X server (Xming) under the same Win 10 system and connecting via "xpra attach" from within PuTTY works.

Starting the client with "-d mouse" generates the following messages when scrolling down:

2017-02-02 17:29:41,362 mousewheel: send 1 wheel events to the server for distance=-120, remainder=0
2017-02-02 17:29:41,382 mousewheel: orientation=vertical distance=-30.0, units=-1, new value=-30.0, keys=0x0, x=434, y=375, client=gtk2.client, wid=218

The messages are displayed everytime the wheel is turned a bit. When scrolling up, only the following is displayed:

2017-02-02 17:28:29,496 mousewheel: orientation=vertical distance=30.0, units=0, new value=0.0, keys=0x0, x=439, y=360, client=gtk2.client, wid=218

Again, every small turn generates this message. Note however, that the "send 1 wheel events" message is missing in this case.

It works in VirtualBox? in a Win7 VM. The host is Win 10. Maybe this is the issue. The issue occurs with four different mice.

Please let me know if I can attach more information.



Fri, 03 Feb 2017 04:53:18 GMT - Lukas Haase:

I forgot to mention that there is never any event received by xev when scrolling up; not even when scrolling up for a minute. While the "mousewheel: orientation=vertical distance=-30.0" are generated every single touch, the "send 1 wheel events to the server" messages never appear.


Fri, 03 Feb 2017 06:56:55 GMT - Antoine Martin: owner changed

Please include a series of scrolling up log event messages with "-d mouse" so we can see the "distance" accumulating. (or not perhaps..) If the distance stays the same, it may be worth running with "-d mouse,win32" or event "-d all" to see what is resetting the distance in between events.


Fri, 03 Feb 2017 07:35:54 GMT - Lukas Haase: attachment set

Log with mouse only


Fri, 03 Feb 2017 07:36:13 GMT - Lukas Haase: attachment set

Log with mouse and win32


Fri, 03 Feb 2017 07:39:26 GMT - Lukas Haase:

Added the log files.

For both I moved the mouse into the X client window and tried not moving the mouse except scrolling the wheel up for many seconds.

I think they do not provide too much more insight. Distance changes but in a very strange way ...


Fri, 03 Feb 2017 10:14:02 GMT - Antoine Martin: keywords, milestone set

It's an interesting bug: it only occurs if the mouse wheel acceleration value is lower than the default (30 vs 120).

We use this ratio to decide if we need to send an event or not:

python -c "print(30//120)"
0
python -c "print(-30//120)"
-1

And when we weren't sending an event, we failed to store the left over.

r14960 (+improved in r14961) fix that and will be backported to the 1.0.x branch. You can find a new beta 2.0 build with this fix here: http://xpra.org/beta/windows/. Please close if this works for you.


Fri, 03 Feb 2017 18:04:36 GMT - Lukas Haase: status changed; resolution set

Great, works for me! Thanks


Sat, 04 Feb 2017 02:25:25 GMT - Antoine Martin:

Applied to v1.0.x in r14967.


Sat, 23 Jan 2021 05:24:03 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1428