Display trust prompts when the app has no surface too
Application's surface list won't get updated until the surface is ready,
but SurfaceManager's (and thus TLWM's) list will. This creates a
situation where the ApplicationWindow has the app's first surface but
thinks that it's not the first, thus blocking trust prompts to appear.
As some trust prompt can blocks the whole application, this creates a
deadlock until the application times out.
To worked around this, ApplicationWindow now displays the trust prompt
if the app's surface list is emply. This assumes that the app won't
create multiple not-ready windows at the same time or creates a
not-ready window while has ready window(s).
commit0fbbe183edeac749b2fa62db226edbb439fe35d3
authorRatchanan Srirattanamet <ratchanan@ubports.com>
dateTue 25 Feb 2020, 17:02 (7 years ago)
parentb0fa722
qml/Stage/ApplicationWindow.qml+3−1
@@ -201,7 +201,9 @@ FocusScope {
201201 objectName: "promptSurfacesRepeater"
202202 // show only along with the top-most application surface
203203 model: {
204− if (root.application && root.surface === root.application.surfaceList.first) {
204+ if (root.application && (
205+ root.surface === root.application.surfaceList.first ||
206+ root.application.surfaceList.count === 0)) {
205207 return root.application.promptSurfaceList;
206208 } else {
207209 return null;