Ticket #1625 (closed bug: fixed)

Opened 13 months ago

Last modified 7 months ago

Scrolling slow --> alright, scrolling fast, changes vert to Horizontal

Reported by: hai_cu_be Owned by: marcusoverhagen
Priority: normal Milestone: R1/alpha1
Component: Drivers/Mouse/PS2 Version: R1 development
Cc: Blocked By:
Platform: All Blocking:

Description (last modified by bonefish) (diff)

Tested in VmWare R22908.

I opened up a small window with the "Bin" folder. Small so that it's scrollable horizontally as well as vertically.

Now, scrolling slowly with the mouse wheel will affect the vertical scroller. Scrolling very quickly will then also start affecting the horizontal scroller. Does not make sense. Reproducable for you?

Change History

Changed 13 months ago by jackburton

I can reproduce this too.

Changed 9 months ago by bonefish

  • milestone changed from R1 to R1/alpha1

Created R1/alpha1 ticket #1913, which might be related.

Changed 8 months ago by stippi

  • status changed from new to closed
  • resolution set to fixed

Can not reproduce anymore. I guess I fixed this too in r24841.

Changed 7 months ago by bonefish

  • status changed from closed to reopened
  • resolution fixed deleted
  • description modified (diff)

Still reproducible in r24949. Tested in VMware. To clarify the description: You have to scroll with the mouse wheel. At the same time I sometimes get the following in the syslog:

ps2: strange mouse data, y-delta 142, trying resync
ps2: bad mouse data, trying resync

So it might rather be PS/2 than interface kit/app server related.

Changed 7 months ago by umccullough

I can definitely reproduce this on real hardware with a PS2 mouse in r25215

Dell Optiplex gx270, P4 2.8ghz, 1gb ram, i865 video

While testing it, I didn't see any errors in the syslog or serial output though.

Changed 7 months ago by umccullough

On the exact same machine, replacing the PS2 mouse with a USB mouse makes the unwanted horizontal scrolling behavior go away for me.

Changed 7 months ago by axeld

  • component changed from Applications/Tracker to Drivers/Mouse/PS2

I had a short look at the driver, and it is indeed not correctly evaluating the wheel data in ps2_packet_to_movement(). It does use the X wheel without having enabled it before; a mouse in Intellimouse mode does not have that wheel. Marcus, do you want to fix it for real, or should I add a quick fix for this?

Changed 7 months ago by axeld

  • owner changed from axeld to marcusoverhagen
  • status changed from reopened to new

Changed 7 months ago by marcusoverhagen

  • status changed from new to assigned

Hi Axel,

I can't fix this until 22:00, but I believe the correct code would be:

int wheel_ydelta = 0; int wheel_xdelta = 0;

[...]

if (cookie->packet_size == PS2_PACKET_INTELLIMOUSE) {

pos->wheel_ydelta = (int)(packet[3] & 0x07); if (packet[3] & 0x08)

pos->wheel_ydelta |= (-1 & ~0x07);

}

[...]

pos->wheel_ydelta = wheel_ydelta; pos->wheel_xdelta = wheel_xdelta;

I don't have a mouse with horizontal scroll wheel yet, and implementing horizontal scrolling will need more initialization.

Changed 7 months ago by marcusoverhagen

Should be fixed in r25230. Please test.

Changed 7 months ago by umccullough

Definitely fixes it for me!

Also fixes the related firefox issue reported in #2171

Changed 7 months ago by marcusoverhagen

  • status changed from assigned to closed
  • resolution set to fixed

fixed in r25230

Changed 7 months ago by scottmc

Nice work. I just noticed with r25247 that scrolling was working for me using two different USB mice, where neither one was scrolling using the wheel in r25137, I had to look up where this one got fixed, I assume this is where it got fixed.

Note: See TracTickets for help on using tickets.