wrong object coordinates if the app goes fullscreen

Bug #1422523 reported by Olivier Tilloy
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
Critical
kevin gunn
qtubuntu (Ubuntu)
Fix Released
Critical
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

Revision history for this message
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
Revision history for this message
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

Revision history for this message
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
Revision history for this message
Florian Boucault (fboucault) wrote :

Affects the camera-app now.

Changed in qtmir:
status: New → Confirmed
Changed in qtubuntu:
status: New → Confirmed
Gerry Boland (gerboland)
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)
Revision history for this message
Daniel d'Andrada (dandrader) wrote :
Revision history for this message
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)
Changed in qtubuntu:
status: In Progress → Fix Released
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
Michał Sawicz (saviq)
affects: qtubuntu → qtubuntu (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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