"Quit" from quicklist doesn’t close all open windows, doesn’t actually quit the application

Bug #1622717 reported by Olivier Tilloy
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
High
Michał Sawicz
qtmir (Ubuntu)
Fix Released
Undecided
Nick Dedekind
unity8 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I’m attaching a sample click application that contains a simple qml scene that opens several windows. This can be installed on a device with:

  pkcon install-local --allow-untrusted fubar.osomon_0.4_all.click

Initially, only one window is open, and tapping on any window opens one more window.

If I reveal the launcher and long press on the app’s icon to select the "Quit" option, not all windows are closed:

 - if there is only one window open, it’s closed and the application successfully exits
 - if there are two windows open, only the second window is closed, the first one remains open (and consequently the application is still running)
 - if there are three windows open, only the first and third one are closed, the second one remains…

Expected behaviour: when "Quit" is tapped, all open windows are closed, and the application exits.

Related branches

Revision history for this message
Olivier Tilloy (osomon) wrote :
Revision history for this message
Olivier Tilloy (osomon) wrote :

Here is the actual QML code contained in the example click package:

import QtQuick 2.4
import QtQuick.Window 2.2
QtObject {
  readonly property var allWindows: []
  property var windowFactory: Component {
    Window {
      onClosing: destroy()
      Component.onCompleted: allWindows.push(this)
      Component.onDestruction: {
        for (var w in allWindows) {
          if (this === allWindows[w]) {
            allWindows.splice(w, 1)
            return
          }
        }
      }
      Rectangle {
        anchors {
          fill: parent
          margins: 20
        }
        color: Qt.rgba(Math.random(), Math.random(), Math.random(), 1)
      }
      MouseArea {
        anchors.fill: parent
        onClicked: windowFactory.createObject(null).show()
      }
    }
  }
  property var applicationMonitor: Connections {
    target: Qt.application
    onAboutToQuit: console.log("quitting application, %1 windows open".arg(allWindows.length))
  }
  Component.onCompleted: windowFactory.createObject(null).show()
}

Michał Sawicz (saviq)
Changed in canonical-devices-system-image:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Michał Sawicz (saviq)
milestone: none → backlog
Revision history for this message
Olivier Tilloy (osomon) wrote :

Related to bug #1624407 ?

Changed in qtmir (Ubuntu):
assignee: nobody → Nick Dedekind (nick-dedekind)
status: New → In Progress
Changed in canonical-devices-system-image:
status: Triaged → In Progress
milestone: backlog → 14
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
Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtmir - 0.4.8+17.04.20161024-0ubuntu1

---------------
qtmir (0.4.8+17.04.20161024-0ubuntu1) zesty; urgency=medium

  [ Andrea Bernabei ]
  * Add missing default return value to qImageFormatFromMirPixelFormat

  [ Michael Zanetti ]
  * don't lose resize events that come in while the app is suspended

  [ Nick Dedekind ]
  * Close windows in reverse order. (LP: #1622717)

 -- Michael Zanetti <email address hidden> Mon, 24 Oct 2016 11:32:53 +0000

Changed in qtmir (Ubuntu):
status: In Progress → Fix Released
Michał Sawicz (saviq)
Changed in unity8 (Ubuntu):
status: Confirmed → Invalid
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I thought this issue was still open since we haven't implemented a proper solution in Mir yet. But then I noticed that's a different bug 1624407 :)

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.