Unity8 not informing clients that they are not visible and thus can stop rendering
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical System Image |
Fix Released
|
High
|
Michał Sawicz | ||
qtmir (Ubuntu) |
Fix Released
|
High
|
Nick Dedekind | ||
unity8 (Ubuntu) |
Fix Released
|
High
|
Nick Dedekind |
Bug Description
Currently on the phone, apps stop rendering when shell hides them, because shell also lifecycle stops the app. App isn't actually told it should stop rendering, we just SIGSTOP its process.
But some apps are not lifecycle stopped, e.g. music. So we should have unity8 tell the app to stop rendering.
This will be a multi-step process:
1. Qtubuntu
Mir has a attribute to set on surfaces to tell them they are visible/occluded: (see mir/include/
mir_surface_
This indicates these possible values:
typedef enum MirSurfaceVisib
{
mir_
mir_
} MirSurfaceVisib
On the client side (qtubuntu), you need to listen for this attribute change, and connect it to QWindowSystemIn
Note there is also a QWindowSystemIn
2. QtMir
There are methods on mir::scene::Surface to set and get the MirSurfaceAttrib attributes. I think it would make sense to use the pre-existing MirSurfaceItem:
3. Unity8
Correctly set visible=false when an application surface is occluded, and true when visible. QML has no automatic way of doing that (i.e. occlusion detection)
Related branches
- Michał Sawicz: Approve
- PS Jenkins bot (community): Approve (continuous-integration)
- Daniel d'Andrada: Pending requested
-
Diff: 50 lines (+13/-1)2 files modifieddebian/changelog (+5/-1)
include/unity/shell/application/MirSurfaceInterface.h (+8/-0)
- Nick Dedekind (community): Abstain
- Daniel d'Andrada (community): Needs Fixing
- PS Jenkins bot: Approve (continuous-integration)
-
Diff: 151 lines (+48/-6)3 files modifiedsrc/ubuntumirclient/input.cpp (+7/-1)
src/ubuntumirclient/window.cpp (+39/-5)
src/ubuntumirclient/window.h (+2/-0)
- Daniel d'Andrada (community): Approve
- PS Jenkins bot (community): Needs Fixing (continuous-integration)
-
Diff: 638 lines (+294/-49)12 files modifieddebian/control (+1/-1)
src/modules/Unity/Application/mirsurface.cpp (+48/-14)
src/modules/Unity/Application/mirsurface.h (+11/-3)
src/modules/Unity/Application/mirsurfaceinterface.h (+4/-2)
src/modules/Unity/Application/mirsurfaceitem.cpp (+17/-4)
src/modules/Unity/Application/mirsurfaceitem.h (+1/-0)
tests/modules/CMakeLists.txt (+2/-2)
tests/modules/SurfaceManager/CMakeLists.txt (+6/-4)
tests/modules/SurfaceManager/mirsurface_test.cpp (+107/-0)
tests/modules/SurfaceManager/mirsurfaceitem_test.cpp (+54/-5)
tests/modules/common/fake_mirsurface.h (+42/-14)
tests/modules/common/fake_session.h (+1/-0)
- PS Jenkins bot (community): Needs Fixing (continuous-integration)
- Michał Sawicz: Needs Fixing
- Michael Zanetti (community): Abstain
- Daniel d'Andrada (community): Needs Fixing
-
Diff: 510 lines (+233/-35)9 files modifieddebian/control (+1/-1)
qml/Stages/DesktopStage.qml (+71/-3)
qml/Stages/PhoneStage.qml (+10/-3)
qml/Stages/TabletStage.qml (+8/-0)
tests/mocks/Unity/Application/MirSurface.cpp (+44/-17)
tests/mocks/Unity/Application/MirSurface.h (+14/-4)
tests/mocks/Unity/Application/MirSurfaceItem.cpp (+12/-2)
tests/mocks/Unity/Application/MirSurfaceItem.h (+1/-0)
tests/qmltests/Stages/tst_DesktopStage.qml (+72/-5)
- PS Jenkins bot (community): Needs Fixing (continuous-integration)
- Daniel d'Andrada (community): Approve
- Michał Sawicz: Pending requested
- Michael Zanetti: Pending requested
-
Diff: 734 lines (+290/-46)13 files modifieddebian/control (+1/-1)
qml/Stages/DesktopStage.qml (+78/-8)
qml/Stages/PhoneStage.qml (+16/-5)
qml/Stages/TabletStage.qml (+17/-1)
qml/Stages/TransformedTabletSpreadDelegate.qml (+2/-0)
tests/mocks/Unity/Application/MirSurface.cpp (+44/-17)
tests/mocks/Unity/Application/MirSurface.h (+14/-4)
tests/mocks/Unity/Application/MirSurfaceItem.cpp (+12/-2)
tests/mocks/Unity/Application/MirSurfaceItem.h (+1/-0)
tests/qmltests/Stages/tst_DesktopStage.qml (+81/-5)
tests/qmltests/Stages/tst_PhoneStage.qml (+4/-0)
tests/qmltests/Stages/tst_TabletStage.qml (+6/-1)
tests/qmltests/tst_Shell.qml (+14/-2)
- Daniel d'Andrada (community): Approve
- Unity8 CI Bot: Approve (continuous-integration)
- PS Jenkins bot: Pending (continuous-integration) requested
- Michael Terry: Pending requested
-
Diff: 44 lines (+13/-0)1 file modifiedsrc/ubuntumirclient/window.cpp (+13/-0)
- Daniel d'Andrada (community): Approve
- Unity8 CI Bot (community): Needs Fixing (continuous-integration)
- PS Jenkins bot (community): Needs Fixing (continuous-integration)
- Michael Terry: Pending requested
-
Diff: 13 lines (+0/-3)1 file modifiedsrc/modules/Unity/Application/mirsurface.cpp (+0/-3)
Changed in qtmir: | |
assignee: | nobody → Mirco Müller (macslow) |
Changed in qtubuntu: | |
assignee: | nobody → Mirco Müller (macslow) |
Changed in unity8 (Ubuntu): | |
assignee: | nobody → Mirco Müller (macslow) |
Changed in qtmir: | |
importance: | Undecided → High |
Changed in qtubuntu: | |
importance: | Undecided → High |
Changed in unity8 (Ubuntu): | |
importance: | Undecided → High |
Changed in qtmir: | |
status: | New → In Progress |
Changed in qtubuntu: | |
status: | New → In Progress |
Changed in unity8 (Ubuntu): | |
status: | New → In Progress |
Changed in canonical-devices-system-image: | |
assignee: | nobody → kevin gunn (kgunn72) |
importance: | Undecided → High |
milestone: | none → ww46-2015 |
status: | New → In Progress |
no longer affects: | qtubuntu |
Changed in qtmir: | |
assignee: | Mirco Müller (macslow) → nobody |
Changed in unity8 (Ubuntu): | |
assignee: | Mirco Müller (macslow) → nobody |
Changed in qtmir: | |
assignee: | nobody → Nick Dedekind (nick-dedekind) |
Changed in unity8 (Ubuntu): | |
assignee: | nobody → Nick Dedekind (nick-dedekind) |
Changed in canonical-devices-system-image: | |
status: | In Progress → Fix Committed |
Changed in canonical-devices-system-image: | |
status: | Fix Committed → Fix Released |
Changed in canonical-devices-system-image: | |
status: | Fix Released → Triaged |
Changed in unity8 (Ubuntu): | |
status: | Fix Released → Triaged |
status: | Triaged → Fix Committed |
status: | Fix Committed → In Progress |
Changed in canonical-devices-system-image: | |
status: | Triaged → In Progress |
Changed in canonical-devices-system-image: | |
milestone: | ww46-2015 → ww02-2016 |
Changed in canonical-devices-system-image: | |
milestone: | ww02-2016 → ww08-2016 |
Changed in canonical-devices-system-image: | |
assignee: | kevin gunn (kgunn72) → Michał Sawicz (saviq) |
Changed in canonical-devices-system-image: | |
milestone: | ww08-2016 → 11 |
Changed in canonical-devices-system-image: | |
milestone: | 11 → 12 |
Changed in canonical-devices-system-image: | |
milestone: | 12 → 13 |
Changed in canonical-devices-system-image: | |
status: | In Progress → Fix Committed |
Changed in qtmir: | |
status: | In Progress → Fix Released |
Changed in unity8 (Ubuntu): | |
status: | In Progress → Fix Released |
Changed in canonical-devices-system-image: | |
status: | Fix Committed → Fix Released |
affects: | qtmir → qtmir (Ubuntu) |
Should probably be added to this Qt api:
http:// doc.qt. io/qt-5/ qml-qtqml- qt.html# application- prop