on xenial help sign in
[NOT FINISHED] Allow shell to load ShimGreeter or inline Greeter based on shellMode

* debian/control is broken * tests are disabled/broken * inline greeter anchoring is broken, so margins are off

commitd86534358c14141fad35643e882bd5d40eef6629 authorJosh Arenson <joshua.arenson@canonical.com> dateTue 14 Apr 2015, 14:40 (12 years ago) parentf3ca9c1
2 files changed+46−37
debian/control−1 qml/Shell.qml+46−36
debian/control−1
@@ -13,7 +13,6 @@ Build-Depends: cmake,
1313# version. To allow cross-compiling to work, we also must
1414# append :native to g++-4.9 so we don't try to run armhf g++
1515# on an x86 CPU for eaxmple, when cross-compiling.
16− g++-4.9:native,
1716 libconnectivity-qt1-dev,
1817 libgl1-mesa-dev[!armhf] | libgl-dev[!armhf],
1918 libgl1-mesa-dri,
qml/Shell.qml+46−36
@@ -82,6 +82,8 @@ Item {
8282 // This is _only_ used to expose the property to autopilot tests
8383 readonly property string testShellMode: shellMode
8484
85+ readonly property alias greeter: greeterLoader.item
86+
8587 function activateApplication(appId) {
8688 if (ApplicationManager.findApplication(appId)) {
8789 ApplicationManager.requestFocusApplication(appId);
@@ -348,51 +350,59 @@ Item {
348350 }
349351 }
350352
351− Greeter {
352− id: greeter
353− objectName: "greeter"
353+ Loader {
354+ id: greeterLoader
355+ sourceComponent: shellMode != "shell" ? integratedGreeter :
356+ Qt.createComponent(Qt.resolvedUrl("Greeter/ShimGreeter.qml"));
357+ }
354358
355− hides: [launcher, panel.indicators]
356− tabletMode: shell.sideStageEnabled
357− launcherOffset: launcher.progress
358− forcedUnlock: tutorial.running || shellMode == "shell"
359− opacity: shellMode == "shell" ? 0 : 1.0
360− background: shell.background
359+ Component {
360+ id: integratedGreeter
361+ Greeter {
362+ objectName: "greeter"
361363
362− anchors.fill: parent
363− anchors.topMargin: panel.panelHeight
364+ hides: [launcher, panel.indicators]
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
364370
365− // avoid overlapping with Launcher's edge drag area
366− // FIXME: Fix TouchRegistry & friends and remove this workaround
367− // Issue involves launcher's DDA getting disabled on a long
368− // left-edge drag
369− dragHandleLeftMargin: launcher.available ? launcher.dragAreaWidth + 1 : 0
371+ height: parent.parent.height; width: parent.parent.width
372+ //anchors.topMargin: panel.panelHeight
370373
371− onSessionStarted: {
372− launcher.hide();
373− }
374+ // avoid overlapping with Launcher's edge drag area
375+ // FIXME: Fix TouchRegistry & friends and remove this workaround
376+ // Issue involves launcher's DDA getting disabled on a long
377+ // left-edge drag
378+ dragHandleLeftMargin: launcher.available ? launcher.dragAreaWidth + 1 : 0
374379
375− onTease: {
376− if (!tutorial.running) {
377− launcher.tease();
380+ onSessionStarted: {
381+ launcher.hide();
382+ }
383+
384+ onTease: {
385+ if (!tutorial.running) {
386+ launcher.tease();
387+ }
378388 }
379− }
380389
381− onEmergencyCall: startLockedApp("dialer-app")
390+ onEmergencyCall: startLockedApp("dialer-app")
382391
383− Timer {
384− // See powerConnection for why this is useful
385− id: showGreeterDelayed
386− interval: 1
387− onTriggered: {
388− greeter.forceShow();
392+ Timer {
393+ // See powerConnection for why this is useful
394+ id: showGreeterDelayed
395+ interval: 1
396+ onTriggered: {
397+ greeter.forceShow();
398+ }
389399 }
390− }
391400
392− Binding {
393− target: ApplicationManager
394− property: "suspended"
395− value: greeter.shown
401+ Binding {
402+ target: ApplicationManager
403+ property: "suspended"
404+ value: greeter.shown
405+ }
396406 }
397407 }
398408
@@ -421,7 +431,7 @@ Item {
421431
422432 onStatusChanged: {
423433 if (Powerd.status === Powerd.Off && reason !== Powerd.Proximity &&
424− !callManager.hasCalls && !tutorial.running) {
434+ !callManager.hasCalls && !tutorial.running && shellMode != "shell") {
425435 // We don't want to simply call greeter.showNow() here, because
426436 // that will take too long. Qt will delay button event
427437 // handling until the greeter is done loading and may think the