Clicking a snap decision button makes the foreground application inactive

Bug #1370240 reported by Gustavo Pichorim Boiko
38
This bug affects 5 people
Affects Status Importance Assigned to Milestone
unity8 (Ubuntu)
Fix Released
High
Josh Arenson
unity8 (Ubuntu RTM)
Fix Released
Critical
Josh Arenson

Bug Description

Steps to reproduce:

1) open an application
2) trigger a snap decision (by receiving a call or something like that)
3) click the snap decision buttons

Expected behavior:
- the foreground application might temporarily switch to active=false while the snap decision is visible or during the interaction with the actions, but should be set back to active=true

What happens:
- when clicking the snap decision action the application active property is set to false and kept like that.

Related branches

summary: Clicking a snap decision button makes the foreground application
- inactive permanently
+ inactive
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity8 (Ubuntu):
status: New → Confirmed
kevin gunn (kgunn72)
no longer affects: unity8 (Ubuntu)
Revision history for this message
Bill Filler (bfiller) wrote :

marking as critical as this is causing Bug #1368862

Changed in qtmir:
importance: Undecided → Critical
tags: added: rtm14
Revision history for this message
kevin gunn (kgunn72) wrote :

greyback - if you think josh can handle, feel free to reassign

Changed in qtmir:
assignee: nobody → Gerry Boland (gerboland)
tags: added: touch-2014-10-02
Revision history for this message
Gerry Boland (gerboland) wrote :

Can repro using lp:unity-notifications:/examples/python sd-example-incoming-call.py

Need to install python-notify package for that script to work.

To make it easier to see if app surface focused or not, use this QML file:

import QtQuick 2.0

Rectangle {
    color: (Qt.application.active) ? "green" : "red"
}

and run with:

qmlscene file.qml --desktop_file_hint=/usr/share/application/mediaplayer-app.desktop

Changed in qtmir:
assignee: Gerry Boland (gerboland) → Josh Arenson (josharenson)
status: New → Triaged
Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

This seems to be the cause of https://bugs.launchpad.net/ubuntu/+source/dialer-app/+bug/1374015 in the dialer app, so it has quite bad effect there.

Revision history for this message
Josh Arenson (josharenson) wrote :

Reports state that this bug did _not_ exist in early September, but I have been unable to find anything in unity8 or qtmir that would have caused this issue. It seems that Shell is firing onActiveFocusChanged for the Notifications element, but the corresponding slot in qtmir/mirsurfaceitem

304: connect(this, &QQuickItem::activeFocusChanged, this, &MirSurfaceItem::updateMirSurfaceFocus)

is never being reached. Thus, the shell never receives surface focus after any of the input elements (buttons, text box) on the snap decision are touched and/or pressed.

After discussion, two solutions were proposed

option 1: make PhoneStage a FocusScope, and enable focus so that "spreadRepeater" will get focus if its parent gets focus. Then also have SpreadDelegate a FocusScope, and try to have the chain of focuses lead to the ApplicationWindow

option 2: Add function to PhoneStage called restoreFocus(). Add same function to SpreadDelegate, which calls ApplicationWindow's forceSurfaceActiveFocusIfReady method. Connect up those functions, so if PhoneStage::restoreFocus is called, it ends up calling the correct instance of forceSurfaceActiveFocusIfReady, and then in Shell.qml have similar function, which calls "applicationsDisplayLoader.item.restoreFocus()"

Option 1 seems more correct, but option 2 seems easier to implement.

Revision history for this message
Josh Arenson (josharenson) wrote :

To clarify

"Reports state that this bug did _not_ exist in early September, but I have been unable to find anything in unity8 or qtmir that would have caused this issue. "

I diffed qtmir-rev248 and unity8-rev1270 against trunk and couldn't find anything that would have 'introduced' this issue.

Revision history for this message
kevin gunn (kgunn72) wrote :

Just to update on this, the branch attached is being reworked for something requiring a tad more effort, but is "better" architecturally. But the root cause & the needed solution is fully understood. I'll let Josh or Gerry speak to specifics.

kevin gunn (kgunn72)
Changed in qtmir:
status: Triaged → In Progress
tags: added: touch-2014-10-09
removed: touch-2014-10-02
Olli Ries (ories)
tags: added: touch-2014-10-16
removed: touch-2014-10-09
Michał Sawicz (saviq)
affects: qtmir → unity8 (Ubuntu)
Changed in unity8 (Ubuntu RTM):
status: New → In Progress
importance: Undecided → Critical
assignee: nobody → Josh Arenson (josharenson)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity8 - 8.00+14.10.20141015.4~rtm-0ubuntu1

---------------
unity8 (8.00+14.10.20141015.4~rtm-0ubuntu1) 14.09; urgency=low

  [ Michał Sawicz ]
  * remove qml ownership confusion for caching unitymenumodels (LP:
    #1368856)

  [ josharenson ]
  * Fix lp:1370240 by making stages interactive when a snap decision is
    dismissed. (LP: #1370240)

  [ Nick Dedekind ]
  * remove qml ownership confusion for caching unitymenumodels (LP:
    #1368856)
  * Implementation of expandable panel design (LP: #1368856)

  [ Albert Astals ]
  * CardAttributes: Specify column and row since the gridlayout gets
    confused sometimes (LP: #1381092)
  * Reset VerticalJournal until the cardTool settles (LP: #1381255)

  [ Mirco Müller ]
  * Added synchronous/confirmation notification support to unity8. (LP:
    #1232633)

  [ Michael Zanetti ]
  * drop all visual indication of "pinning" (LP: #1381054)
  * Fix lp:1370240 by making stages interactive when a snap decision is
    dismissed. (LP: #1370240)

  [ Antti Kaijanmäki ]
  * Unlock all modems on boot. (LP: #1333121)
 -- Ubuntu daily release <email address hidden> Wed, 15 Oct 2014 16:44:20 +0000

Changed in unity8 (Ubuntu RTM):
status: In Progress → Fix Released
kevin gunn (kgunn72)
Changed in unity8 (Ubuntu):
status: In Progress → Fix Released
kevin gunn (kgunn72)
Changed in unity8 (Ubuntu):
status: Fix Released → In Progress
Olli Ries (ories)
Changed in unity8 (Ubuntu):
importance: Critical → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity8 - 8.00+15.04.20141030-0ubuntu1

---------------
unity8 (8.00+15.04.20141030-0ubuntu1) vivid; urgency=low

  [ josharenson ]
  * Fix lp:1370240 by making stages interactive when a snap decision is
    dismissed. (LP: #1370240)

  [ Nick Dedekind ]
  * remove qml ownership confusion for caching unitymenumodels (LP:
    #1368856)
  * Implementation of expandable panel design (LP: #1368856)

  [ Albert Astals ]
  * CardAttributes: Specify column and row since the gridlayout gets
    confused sometimes (LP: #1381092)
  * Reset VerticalJournal until the cardTool settles (LP: #1381255)

  [ Mirco Müller ]
  * Added synchronous/confirmation notification support to unity8. (LP:
    #1232633)

  [ Michael Zanetti ]
  * Fix lp:1370240 by making stages interactive when a snap decision is
    dismissed. (LP: #1370240)
  * Drop all visual indication of "pinning" (LP: #1381054)

  [ Antti Kaijanmäki ]
  * Unlock all modems on boot. (LP: #1333121)
 -- Ubuntu daily release <email address hidden> Thu, 30 Oct 2014 10:51:17 +0000

Changed in unity8 (Ubuntu):
status: In Progress → Fix Released
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.