ATK GlobalRects giving nonsense locations

Bug #1176234 reported by Allan LeSage on 2013-05-03
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Alberto Mardegan
autopilot-gtk (Ubuntu)

Bug Description

ken-vandine noticed a failing test based on absurd negative rectangle locations; Ken and I bisected and found that the AddAtkComponentProperties function may be at fault. Having struggled to compose rects I believe the atk_component_get_extents function may be implicated. I'm offering this bug to mardy for the most effective disposition :) .

Ken's failing test is in his branch, lp:~ken-vandine/gnome-control-center-signon/autopilot, name gnome_control_center_signon.test_control_center_signon.ControlCenterTests.test_available_providers .

Related branches

Alberto Mardegan (mardy) wrote :

One thing I noticed is that all widgets which are not currently visible on screen have a wrong globalRect. What is worse is that I didn't find any way to tell whether a widget is currently visible or not.
I'll try and see if we can at least return a well-known invalid rect in that case (maybe (-1,-1,0,0)) instead of completely random numbers.

Alberto Mardegan (mardy) wrote :

I linked a branch which might solve the issue, but "autopilot vis" doesn't seem to exist anymore. Is there any replacement?

Changed in autopilot-gtk:
status: New → In Progress
Thomi Richards (thomir) wrote :

Hi Alberto,

autopilot vis is now in a separate package - you need to install python-autopilot-vis.

Martin Pitt (pitti) wrote :

The current test in doesn't access globalRect. However, I read the code of atk_component_get_extents(), and it indeed just returns without changing its input variables if it's not a valid component. So the attached branch makes sense.

I was going to replicate that in a test, but the current logic makes widgets not have a globalRect property at all until they become visible. I'll try to hide them again and ensure that globalRect has a sensible value.

Martin Pitt (pitti) wrote :

I cannot reproduce this. I tried with a widget and a GtkDialog, and in both cases the widget does not have a globalRect property until it becomes visible; while being visible it has a valid rect, and after it gets hidden the globalRect stays at the old (valid) values. The latter is probalby a bit questionable, but as the "visible" property is false, one shouldn't pay attention to it.

Is that still an issue with current autopilot-gtk? Ken?

Changed in autopilot-gtk:
status: In Progress → Incomplete
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:autopilot-gtk at revision 45, scheduled for release in autopilot-gtk, milestone Unknown

Changed in autopilot-gtk:
status: Incomplete → Fix Committed
Martin Pitt (pitti) on 2013-06-26
Changed in autopilot-gtk:
status: Fix Committed → Incomplete
Martin Pitt (pitti) on 2013-06-27
Changed in autopilot-gtk (Ubuntu):
status: New → Incomplete
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package autopilot-gtk - 1.3+13.10.20130627-0ubuntu1

autopilot-gtk (1.3+13.10.20130627-0ubuntu1) saucy; urgency=low

  [ Martin Pitt ]
  * Add make test/ctest integration, and run tests during package build.
  * Add integration test suite (LP: #1083612). (LP: #1083612)

  [ Alberto Mardegan ]
  * Initialize rect fields to -1 This makes the globalRect variable
    return negative values (for some reason, not -1 but -2147483648)
    when the rectangle is offscreen. (LP: #1176234)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 46
 -- Ubuntu daily release <email address hidden> Thu, 27 Jun 2013 00:01:15 +0000

Changed in autopilot-gtk (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers