last focused app is resumed (active=true) while in spread, after lock & unlock

Bug #1353593 reported by Gerry Boland
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qtmir (Ubuntu)
Invalid
Medium
Josh Arenson

Bug Description

Steps to Repro:
1. Open Camera app
2. Go to spread - see Camera app blacks out - it has Qt.application.active=false
3. Hit power key to lock
4. Hit power key and unlock the greeter
5. Look at Camera in spread

Bug:
Camera app is live in the spread again. Means Qt.application.active=true which is incorrect.

Gerry Boland (gerboland)
Changed in qtmir:
status: New → Confirmed
importance: Undecided → Medium
Changed in qtmir:
assignee: nobody → Josh Arenson (josharenson)
Gerry Boland (gerboland)
Changed in qtmir:
status: Confirmed → In Progress
Revision history for this message
Gerry Boland (gerboland) wrote :

I compiled qtubuntu with debug output enabled and watched the output while reproducing this bug.

I can confirm that unity8 is not sending camera app a focused event at step 5. So it appears that when the camera app process is resumed, it brings up the camera even if its window is not focused.

Relevant output (interspersed with comments):

<step 2 - enter spread>
eventCallback (context=0x57c0e0, event=0xb2f6c090)
UbuntuInput::customEvent(type=SURFACE_WEVENT_TYPE)
UbuntuWindow::handleSurfaceFocusChange(focused=false)

<step 3 - power off>
<step 4 - power on>
<step 5 - unlock greeter>

virtual QSGVideoNode* ShaderVideoNodePlugin::createNode(const QVideoSurfaceFormat&)
void AalVideoRendererControl::onTextureCreated(unsigned int) : textureId: 12
Already have a texture id and video sink, not creating a new one

<meaning camera backend starts up again to show camera output on screen - but no focused event has been sent to it>

So I created a simple QML app to exhibit the Qt.application.active property

import QtQuick 2.0

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

so it is green if active, red if not. Run with
qmlscene active-app.qml --desktop_file_hint=/usr/share/applications/mediaplayer-app.desktop

This test exhibits the same problem as camera app does. Somehow Qt.application.active it set to be true after process resume, even if the surface is still unfocused.

Revision history for this message
Gerry Boland (gerboland) wrote :

Quick check that the process of sending SIGSTOP and SIGCONT signals to Qt might change Qt.application.active gives false result. Something else to blame

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

@gerboland, can you reproduce this any more? I am unable to.

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

Policy changes have rendered this bug invalid. If the device is locked with the spread open, the last focused app is shown when the device is unlocked instead.

Changed in qtmir:
status: In Progress → Invalid
Michał Sawicz (saviq)
affects: qtmir → qtmir (Ubuntu)
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.