wrong object coordinates if the app goes fullscreen

Bug #1422523 reported by Olivier Tilloy on 2015-02-16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Canonical System Image
kevin gunn
qtubuntu (Ubuntu)
Daniel d'Andrada

Bug Description

While investigating autopilot test failures in gallery-app on Ubuntu Touch (see bug #1422418), I observed that a menu was being open, and the wrong menu item was being pressed (the item below the targetted one was being pressed). I realized that what seemed to have introduced the regression was a change in the app whereby it would go fullscreen at a given point in time during its execution. When the app goes fullscreen on Ubuntu Touch, the top indicators bar disappears, thus moving the window upwards by 41px (on krillin)). It seems that when the app does that, autopilot gets the coordinates for objects on screen as if the window hadn’t moved, and therefore clicks don’t happen where they are expected. Could it be that the absolute coordinates of the window are cached and not updated when it goes fullscreen?

Related branches

Olivier Tilloy (osomon) wrote :

Just confirmed my suspicion by printing the app’s main view globalRect property before it goes fullscreen and after:

  - before: Rectangle(0, 41, 540, 919)
  - after: Rectangle(0, 41, 540, 960)

It appears the height is correctly updated, but not the y coordinate.

description: updated
Gerry Boland (gerboland) wrote :

qtubuntu a likely cause yeah. mir apps are not informed of their window position on screen, so I've hacky heuristics in qtubuntu to guess window positioning, which AP uses to calculate absolute input coordinates. Those heuristics not aware of window state change probably

Olivier Tilloy (osomon) wrote :

This is related to bug #1346633. QtMir needs to use the API introduced in Mir to find the surface position relative to the screen.

affects: autopilot → qtmir
Florian Boucault (fboucault) wrote :

Affects the camera-app now.

Changed in qtmir:
status: New → Confirmed
Changed in qtubuntu:
status: New → Confirmed
Gerry Boland (gerboland) on 2015-11-27
Changed in qtubuntu:
importance: Undecided → Critical
status: Confirmed → Triaged
Changed in qtmir:
status: Confirmed → Invalid
no longer affects: qtmir
Changed in qtubuntu:
status: Triaged → In Progress
assignee: nobody → Daniel d'Andrada (dandrader)
Daniel d'Andrada (dandrader) wrote :

Can't use the mentioned Mir API just yet.

Changed in canonical-devices-system-image:
status: New → In Progress
Changed in canonical-devices-system-image:
importance: Undecided → Critical
milestone: none → ww02-2016
assignee: nobody → kevin gunn (kgunn72)
Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
Michał Sawicz (saviq) on 2015-12-11
Changed in qtubuntu:
status: In Progress → Fix Released
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
Michał Sawicz (saviq) on 2017-03-13
affects: qtubuntu → qtubuntu (Ubuntu)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers