xpra icon
Bug tracker and wiki

Opened 3 months ago

Last modified 12 days ago

#1797 new task

precise wheel event for the html5 client

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: 2.3
Component: html5 Version: 2.2.x
Keywords: Cc:

Description

Follow up from #1611.

Change History (11)

comment:1 Changed 3 months ago by Antoine Martin

Owner: changed from Antoine Martin to J. Max Mena

Done in r18920, the html5 client will now trigger precise scroll events if the server has uinput enabled:

UInput.wheel_motion(4, 0.5740) REL_WHEEL: 0.7+17.22=17.92

@maxmylyn: works for me, could be interesting for you guys. Do we need to map the macos scroll direction differently? (ie: is it somehow normalized the "right" way by some browsers)

comment:2 Changed 2 months ago by J. Max Mena

Owner: changed from J. Max Mena to Antoine Martin

Checked with Firefox and Chrome in OSX - and yes the scroll direction is reversed.

Checked with a r19034 Fedora 26 server.

comment:3 Changed 2 months ago by Antoine Martin

Owner: changed from Antoine Martin to J. Max Mena

Checked with Firefox and Chrome in OSX - and yes the scroll direction is reversed.

Not sure if that means that we're doing the right thing or that we need to invert the values on macos. Please clarify.

comment:4 Changed 8 weeks ago by J. Max Mena

Owner: changed from J. Max Mena to Antoine Martin

We need to invert the values on MacOS but only for the horizontal. That would bring it in line with local MacOS applications.

comment:5 Changed 8 weeks ago by Antoine Martin

Owner: changed from Antoine Martin to J. Max Mena

We need to invert the values on MacOS but only for the horizontal. That would bring it in line with local MacOS applications.

Did you test horizontal scrolling with a non-macos OS to compare? (ideally ms windows)
What application did you use to decide what is the desired scroll direction? (both native and through xpra)

I only have horizontal buttons, no wheel on any of my test devices. Those events come up a individual clicks, and they're using the same button number (4 and 5) as what vertical scrolling is meant to use (with r19072 to get javascript console debug logging with "mouse" debug enabled):

click: 4 true 453 228
click: 5 false 452 228

So r19073 remaps those buttons to 8 / 9, since that's what xev sees without xpra - I'm not 100% sure that's right though.
On windows using those button triggers navigation - making it impossible to figure out the button number that javascript should be seeing.
On the mac mini, the left and right horizontal buttons both trigger button 3 (middle click)...

Last edited 13 days ago by Antoine Martin (previous) (diff)

comment:6 Changed 3 weeks ago by Antoine Martin

Milestone: 2.3

comment:7 Changed 13 days ago by J. Max Mena

Owner: changed from J. Max Mena to Antoine Martin

I made a serious mistake when testing this ticket. I got this ticket and #1157 mixed up, so I was testing this with the Wacom Tablet. As such, the Wacom tablet X-direction was reversed not the mouse buttons. Those were working as expected and as such are now reversed in the X-direction.

I apologize profusely. Reversing the buttons again will make it work as expected.

comment:8 Changed 13 days ago by Antoine Martin

Owner: changed from Antoine Martin to J. Max Mena

r19574 swaps left and right. Please confirm that this fixes things so that I can backport.

comment:9 Changed 13 days ago by J. Max Mena

I upped my server from r19572 to r19574 and I see no change. It's still reversed.

I wonder if there's something else going on here - I'll update my laptop which has an Apple trackpad versus my Logitech MX, and see if I can get ahold of an "Official" Apple Mouse.

Last edited 13 days ago by Antoine Martin (previous) (diff)

comment:10 Changed 13 days ago by Antoine Martin

I upped my server from r19572 to r19574 and I see no change. It's still reversed.

Change reverted in r19575.
This ticket is about scrolling, which is usually done using wheels or touchpad gestures.

Please provide xev button numbers and the server's "-d mouse".

comment:11 Changed 12 days ago by J. Max Mena

Owner: changed from J. Max Mena to Antoine Martin

Oh so it looks like I really have no idea what I'm doing then.

So I double checked this with my laptop's trackpad (after 4 hours of updates, I'm not even joking) and the horizontal scroll is definitely reversed as of r19581.

Here's a snippet of me scrolling to the left (as in my physical fingers are moving to the left), but the image I'm zoomed in on moves to the right (incorrectly, I verified with local Chrome that it should be moving to the left with my fingers).

2018-06-07 15:33:37,713 move_pointer(2, [447, 778], -1) screen_no=-1, device=XTestPointerDevice
2018-06-07 15:33:37,714 xtest_fake_motion(-1, 447, 778)
2018-06-07 15:33:37,714 xtest_fake_button(7, 1)
2018-06-07 15:33:37,714 process_button_action(Protocol(ws websocket: 192.168.1.81:14500 <- 192.168.1.145:49576), ['button-action', 2, 7, 0, [447, 778], [], []])
2018-06-07 15:33:37,714 client X11ServerSource(1 : Protocol(ws websocket: 192.168.1.81:14500 <- 192.168.1.145:49576)): server window position: (2, 202), client window position: (2, 202, 1276, 985)
2018-06-07 15:33:37,714 raising WindowModel(0x1000001)
2018-06-07 15:33:37,714 move_pointer(2, [447, 778], -1) screen_no=-1, device=XTestPointerDevice
2018-06-07 15:33:37,714 xtest_fake_motion(-1, 447, 778)
2018-06-07 15:33:37,715 xtest_fake_button(7, 0)
2018-06-07 15:33:37,715 process_button_action(Protocol(ws websocket: 192.168.1.81:14500 <- 192.168.1.145:49576), ['button-action', 2, 7, 1, [447, 778], [], []])
2018-06-07 15:33:37,718 client X11ServerSource(1 : Protocol(ws websocket: 192.168.1.81:14500 <- 192.168.1.145:49576)): server window position: (2, 202), client window position: (2, 202, 1276, 985)
2018-06-07 15:33:37,718 raising WindowModel(0x1000001)
2018-06-07 15:33:37,719 move_pointer(2, [447, 778], -1) screen_no=-1, device=XTestPointerDevice
2018-06-07 15:33:37,719 xtest_fake_motion(-1, 447, 778)
2018-06-07 15:33:37,719 xtest_fake_button(7, 1)
2018-06-07 15:33:37,719 process_button_action(Protocol(ws websocket: 192.168.1.81:14500 <- 192.168.1.145:49576), ['button-action', 2, 7, 0, [447, 778], [], []])
2018-06-07 15:33:37,719 client X11ServerSource(1 : Protocol(ws websocket: 192.168.1.81:14500 <- 192.168.1.145:49576)): server window position: (2, 202), client window position: (2, 202, 1276, 985)
2018-06-07 15:33:37,719 raising WindowModel(0x1000001)
2018-06-07 15:33:37,720 move_pointer(2, [447, 778], -1) screen_no=-1, device=XTestPointerDevice
2018-06-07 15:33:37,720 xtest_fake_motion(-1, 447, 778)
2018-06-07 15:33:37,720 xtest_fake_button(7, 0)
2018-06-07 15:33:37,720 process_button_action(Protocol(ws websocket: 192.168.1.81:14500 <- 192.168.1.145:49576), ['button-action', 0, 7, 1, [447, 778], [], []])
2018-06-07 15:33:37,720 move_pointer(0, [447, 778], -1) screen_no=-1, device=XTestPointerDevice
2018-06-07 15:33:37,720 xtest_fake_motion(-1, 447, 778)
2018-06-07 15:33:37,720 xtest_fake_button(7, 1)
2018-06-07 15:33:37,720 process_button_action(Protocol(ws websocket: 192.168.1.81:14500 <- 192.168.1.145:49576), ['button-action', 0, 7, 0, [447, 778], [], []])
2018-06-07 15:33:37,721 move_pointer(0, [447, 778], -1) screen_no=-1, device=XTestPointerDevice
2018-06-07 15:33:37,721 xtest_fake_motion(-1, 447, 778)
2018-06-07 15:33:37,721 xtest_fake_button(7, 0)
2018-06-07 15:33:37,937 process_button_action(Protocol(ws websocket: 192.168.1.81:14500 <- 192.168.1.145:49576), ['button-action', 2, 7, 1, [447, 778], [], []])
2018-06-07 15:33:37,939 client X11ServerSource(1 : Protocol(ws websocket: 192.168.1.81:14500 <- 192.168.1.145:49576)): server window position: (2, 202), client window position: (2, 202, 1276, 985)
2018-06-07 15:33:37,939 raising WindowModel(0x1000001)
2018-06-07 15:33:37,940 move_pointer(2, [447, 778], -1) screen_no=-1, device=XTestPointerDevice
2018-06-07 15:33:37,940 xtest_fake_motion(-1, 447, 778)
2018-06-07 15:33:37,941 xtest_fake_button(7, 1)
2018-06-07 15:33:37,942 process_button_action(Protocol(ws websocket: 192.168.1.81:14500 <- 192.168.1.145:49576), ['button-action', 2, 7, 0, [447, 778], [], []])
2018-06-07 15:33:37,942 client X11ServerSource(1 : Protocol(ws websocket: 192.168.1.81:14500 <- 192.168.1.145:49576)): server window position: (2, 202), client window position: (2, 202, 1276, 985)
2018-06-07 15:33:37,943 raising WindowModel(0x1000001)
2018-06-07 15:33:37,943 move_pointer(2, [447, 778], -1) screen_no=-1, device=XTestPointerDevice
2018-06-07 15:33:37,943 xtest_fake_motion(-1, 447, 778)
2018-06-07 15:33:37,944 xtest_fake_button(7, 0)

For reference (not sure if it's useful or not), here's a snippet of the correct scroll direction in the verticle - moving my fingers down:

2018-06-07 15:35:27,133 move_pointer(2, [447, 778], -1) screen_no=-1, device=XTestPointerDevice
2018-06-07 15:35:27,133 xtest_fake_motion(-1, 447, 778)
2018-06-07 15:35:27,134 xtest_fake_button(5, 1)
2018-06-07 15:35:27,134 process_button_action(Protocol(ws websocket: 192.168.1.81:14500 <- 192.168.1.145:49576), ['button-action', 2, 5, 0, [447, 778], [], []])
2018-06-07 15:35:27,134 client X11ServerSource(1 : Protocol(ws websocket: 192.168.1.81:14500 <- 192.168.1.145:49576)): server window position: (2, 202), client window position: (2, 202, 1276, 985)
2018-06-07 15:35:27,135 raising WindowModel(0x1000001)
2018-06-07 15:35:27,135 move_pointer(2, [447, 778], -1) screen_no=-1, device=XTestPointerDevice
2018-06-07 15:35:27,135 xtest_fake_motion(-1, 447, 778)
2018-06-07 15:35:27,135 xtest_fake_button(5, 0)
2018-06-07 15:35:27,182 process_button_action(Protocol(ws websocket: 192.168.1.81:14500 <- 192.168.1.145:49576), ['button-action', 2, 5, 1, [447, 778], [], []])
2018-06-07 15:35:27,183 client X11ServerSource(1 : Protocol(ws websocket: 192.168.1.81:14500 <- 192.168.1.145:49576)): server window position: (2, 202), client window position: (2, 202, 1276, 985)
2018-06-07 15:35:27,183 raising WindowModel(0x1000001)
2018-06-07 15:35:27,183 move_pointer(2, [447, 778], -1) screen_no=-1, device=XTestPointerDevice
2018-06-07 15:35:27,184 xtest_fake_motion(-1, 447, 778)
2018-06-07 15:35:27,184 xtest_fake_button(5, 1)
2018-06-07 15:35:27,184 process_button_action(Protocol(ws websocket: 192.168.1.81:14500 <- 192.168.1.145:49576), ['button-action', 2, 5, 0, [447, 778], [], []])
2018-06-07 15:35:27,185 client X11ServerSource(1 : Protocol(ws websocket: 192.168.1.81:14500 <- 192.168.1.145:49576)): server window position: (2, 202), client window position: (2, 202, 1276, 985)
2018-06-07 15:35:27,185 raising WindowModel(0x1000001)
2018-06-07 15:35:27,185 move_pointer(2, [447, 778], -1) screen_no=-1, device=XTestPointerDevice
2018-06-07 15:35:27,185 xtest_fake_motion(-1, 447, 778)
2018-06-07 15:35:27,185 xtest_fake_button(5, 0)
2018-06-07 15:35:27,232 process_button_action(Protocol(ws websocket: 192.168.1.81:14500 <- 192.168.1.145:49576), ['button-action', 0, 5, 1, [447, 778], [], []])
2018-06-07 15:35:27,232 move_pointer(0, [447, 778], -1) screen_no=-1, device=XTestPointerDevice
2018-06-07 15:35:27,232 xtest_fake_motion(-1, 447, 778)
2018-06-07 15:35:27,232 xtest_fake_button(5, 1)
2018-06-07 15:35:27,232 process_button_action(Protocol(ws websocket: 192.168.1.81:14500 <- 192.168.1.145:49576), ['button-action', 0, 5, 0, [447, 778], [], []])
2018-06-07 15:35:27,232 move_pointer(0, [447, 778], -1) screen_no=-1, device=XTestPointerDevice
2018-06-07 15:35:27,233 xtest_fake_motion(-1, 447, 778)
2018-06-07 15:35:27,233 xtest_fake_button(5, 0)
2018-06-07 15:35:27,314 process_button_action(Protocol(ws websocket: 192.168.1.81:14500 <- 192.168.1.145:49576), ['button-action', 0, 5, 1, [447, 778], [], []])
2018-06-07 15:35:27,315 move_pointer(0, [447, 778], -1) screen_no=-1, device=XTestPointerDevice
2018-06-07 15:35:27,315 xtest_fake_motion(-1, 447, 778)
2018-06-07 15:35:27,315 xtest_fake_button(5, 1)
2018-06-07 15:35:27,315 process_button_action(Protocol(ws websocket: 192.168.1.81:14500 <- 192.168.1.145:49576), ['button-action', 0, 5, 0, [447, 778], [], []])
2018-06-07 15:35:27,316 move_pointer(0, [447, 778], -1) screen_no=-1, device=XTestPointerDevice
2018-06-07 15:35:27,316 xtest_fake_motion(-1, 447, 778)
2018-06-07 15:35:27,316 xtest_fake_button(5, 0)
2018-06-07 15:35:27,668 process_button_action(Protocol(ws websocket: 192.168.1.81:14500 <- 192.168.1.145:49576), ['button-action', 0, 5, 1, [447, 778], [], []])
2018-06-07 15:35:27,669 move_pointer(0, [447, 778], -1) screen_no=-1, device=XTestPointerDevice
2018-06-07 15:35:27,669 xtest_fake_motion(-1, 447, 778)
2018-06-07 15:35:27,670 xtest_fake_button(5, 1)
2018-06-07 15:35:27,671 process_button_action(Protocol(ws websocket: 192.168.1.81:14500 <- 192.168.1.145:49576), ['button-action', 0, 5, 0, [447, 778], [], []])
2018-06-07 15:35:27,673 move_pointer(0, [447, 778], -1) screen_no=-1, device=XTestPointerDevice
2018-06-07 15:35:27,674 xtest_fake_motion(-1, 447, 778)
2018-06-07 15:35:27,677 xtest_fake_button(5, 0)

Again, apologies. Passing back to you.

Note: See TracTickets for help on using tickets.