on xenial help sign in
[NOT FINISHED] Allow shell to load ShimGreeter or inline Greeter based on shellMode
d865343Josh Arenson
debian/control−1
@@ -13,7 +13,6 @@ Build-Depends: cmake,
13# version. To allow cross-compiling to work, we also must
13# version. To allow cross-compiling to work, we also must
14# append :native to g++-4.9 so we don't try to run armhf g++
14# append :native to g++-4.9 so we don't try to run armhf g++
15# on an x86 CPU for eaxmple, when cross-compiling.
15# on an x86 CPU for eaxmple, when cross-compiling.
16− g++-4.9:native,
17 libconnectivity-qt1-dev,
16 libconnectivity-qt1-dev,
18 libgl1-mesa-dev[!armhf] | libgl-dev[!armhf],
17 libgl1-mesa-dev[!armhf] | libgl-dev[!armhf],
19 libgl1-mesa-dri,
18 libgl1-mesa-dri,
qml/Shell.qml+46−36
@@ -82,6 +82,8 @@ Item {
82 // This is _only_ used to expose the property to autopilot tests
82 // This is _only_ used to expose the property to autopilot tests
83 readonly property string testShellMode: shellMode
83 readonly property string testShellMode: shellMode
84
84
85+ readonly property alias greeter: greeterLoader.item
86+
85 function activateApplication(appId) {
87 function activateApplication(appId) {
86 if (ApplicationManager.findApplication(appId)) {
88 if (ApplicationManager.findApplication(appId)) {
87 ApplicationManager.requestFocusApplication(appId);
89 ApplicationManager.requestFocusApplication(appId);
@@ -348,51 +350,59 @@ Item {
348 }
350 }
349 }
351 }
350
352
351− Greeter {
353+ Loader {
352− id: greeter
354+ id: greeterLoader
353− objectName: "greeter"
355+ sourceComponent: shellMode != "shell" ? integratedGreeter :
356+ Qt.createComponent(Qt.resolvedUrl("Greeter/ShimGreeter.qml"));
357+ }
354
358
355− hides: [launcher, panel.indicators]
359+ Component {
356− tabletMode: shell.sideStageEnabled
360+ id: integratedGreeter
357− launcherOffset: launcher.progress
361+ Greeter {
358− forcedUnlock: tutorial.running || shellMode == "shell"
362+ objectName: "greeter"
359− opacity: shellMode == "shell" ? 0 : 1.0
360− background: shell.background
361
363
362− anchors.fill: parent
364+ hides: [launcher, panel.indicators]
363− anchors.topMargin: panel.panelHeight
365+ tabletMode: shell.sideStageEnabled
366+ launcherOffset: launcher.progress
367+ forcedUnlock: tutorial.running || shellMode == "shell"
368+ opacity: shellMode == "shell" ? 0 : 1.0
369+ background: shell.background
364
370
365− // avoid overlapping with Launcher's edge drag area
371+ height: parent.parent.height; width: parent.parent.width
366− // FIXME: Fix TouchRegistry & friends and remove this workaround
372+ //anchors.topMargin: panel.panelHeight
367− // Issue involves launcher's DDA getting disabled on a long
368− // left-edge drag
369− dragHandleLeftMargin: launcher.available ? launcher.dragAreaWidth + 1 : 0
370
373
371− onSessionStarted: {
374+ // avoid overlapping with Launcher's edge drag area
372− launcher.hide();
375+ // FIXME: Fix TouchRegistry & friends and remove this workaround
373− }
376+ // Issue involves launcher's DDA getting disabled on a long
377+ // left-edge drag
378+ dragHandleLeftMargin: launcher.available ? launcher.dragAreaWidth + 1 : 0
374
379
380+ onSessionStarted: {
381+ launcher.hide();
382+ }
383+
375− onTease: {
384+ onTease: {
376− if (!tutorial.running) {
385+ if (!tutorial.running) {
377− launcher.tease();
386+ launcher.tease();
387+ }
378 }
388 }
379− }
380
389
381− onEmergencyCall: startLockedApp("dialer-app")
390+ onEmergencyCall: startLockedApp("dialer-app")
382
391
383− Timer {
392+ Timer {
384− // See powerConnection for why this is useful
393+ // See powerConnection for why this is useful
385− id: showGreeterDelayed
394+ id: showGreeterDelayed
386− interval: 1
395+ interval: 1
387− onTriggered: {
396+ onTriggered: {
388− greeter.forceShow();
397+ greeter.forceShow();
398+ }
389 }
399 }
390− }
391
400
392− Binding {
401+ Binding {
393− target: ApplicationManager
402+ target: ApplicationManager
394− property: "suspended"
403+ property: "suspended"
395− value: greeter.shown
404+ value: greeter.shown
405+ }
396 }
406 }
397 }
407 }
398
408
@@ -421,7 +431,7 @@ Item {
421
431
422 onStatusChanged: {
432 onStatusChanged: {
423 if (Powerd.status === Powerd.Off && reason !== Powerd.Proximity &&
433 if (Powerd.status === Powerd.Off && reason !== Powerd.Proximity &&
424− !callManager.hasCalls && !tutorial.running) {
434+ !callManager.hasCalls && !tutorial.running && shellMode != "shell") {
425 // We don't want to simply call greeter.showNow() here, because
435 // We don't want to simply call greeter.showNow() here, because
426 // that will take too long. Qt will delay button event
436 // that will take too long. Qt will delay button event
427 // handling until the greeter is done loading and may think the
437 // handling until the greeter is done loading and may think the