UbuntuTestCase.mouseMoveSlowly does not work for negative distance

Bug #1343334 reported by Renato Araujo Oliveira Filho
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu UI Toolkit
Fix Released
Critical
Zsombor Egri
ubuntu-ui-toolkit (Ubuntu)
Fix Released
Undecided
Unassigned
Vivid
New
Undecided
Unassigned
ubuntu-ui-toolkit (Ubuntu RTM)
Fix Released
Undecided
Unassigned

Bug Description

Trying to use mouseMoveSlowly to simulate a mouse move from right to left does not work.

And moving in the y is broken.

Tags: rtm14

Related branches

Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

This should fix the problem.

        function mouseMoveSlowly(item, x, y, dx, dy, steps, stepdelay) {
            mouseMove(item, x, y);
            var abs_dx = Math.abs(dx)
            var abs_dy = Math.abs(dy)
            var step_dx = dx / steps;
            var step_dy = dy /steps;

            var ix = 0;
            var iy = 0;

            for (var step=0; step < steps; step++) {
                if (ix < abs_dx) {
                    ix += step_dx;
                }
                if (iy < abs_dy) {
                    iy += step_dy;
                }
                mouseMove(item, x + ix, y + iy, stepdelay);
            }
        }

Zsombor Egri (zsombi)
Changed in ubuntu-ui-toolkit:
importance: Undecided → Critical
status: New → Triaged
assignee: nobody → Zsombor Egri (zsombi)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:ubuntu-ui-toolkit/staging at revision None, scheduled for release in ubuntu-ui-toolkit, milestone Unknown

Changed in ubuntu-ui-toolkit:
status: Triaged → Fix Committed
tags: added: rtm14
Zoltan Balogh (bzoltan)
Changed in ubuntu-ui-toolkit:
milestone: none → 10.24
Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
status: Fix Committed → Fix Released
Zsombor Egri (zsombi)
Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Fix Released
Changed in ubuntu-ui-toolkit (Ubuntu RTM):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.