on xenial help sign in
fixes
851c462Michael Zanetti
qml/Components/VirtualTouchPad.qml+24−9
@@ -29,8 +29,30 @@ Item {
29 Component.onDestruction: removeMouse();
29 Component.onDestruction: removeMouse();
30 }
30 }
31
31
32+ Component.onCompleted: {
33+ if (!inputMethodState.touchpadTutorialHasRun) {
34+ root.runTutorial()
35+ }
36+ }
37+
32 function runTutorial() {
38 function runTutorial() {
39+ // If the tutorial animation is started too early, e.g. in Component.onCompleted,
40+ // root width & height might be reported as 0x0 still. As animations read their
41+ // values at startup and won't update them, lets make sure to only start once
42+ // we have some actual size.
43+ if (root.width > 0 && root.height > 0) {
33− tutorial.start()
44+ tutorial.start();
45+ } else {
46+ tutorialTimer.start();
47+ }
48+ }
49+
50+ Timer {
51+ id: tutorialTimer
52+ interval: 50
53+ repeat: false
54+ running: false
55+ onTriggered: root.runTutorial();
34 }
56 }
35
57
36 readonly property bool pressed: point1.pressed || point2.pressed || leftButton.pressed || rightButton.pressed
58 readonly property bool pressed: point1.pressed || point2.pressed || leftButton.pressed || rightButton.pressed
@@ -42,12 +64,6 @@ Item {
42 property bool oskEnabled: true
64 property bool oskEnabled: true
43 }
65 }
44
66
45− Component.onCompleted: {
46− if (!inputMethodState.touchpadTutorialHasRun) {
47− tutorial.start();
48− }
49− }
50−
51 MultiPointTouchArea {
67 MultiPointTouchArea {
52 objectName: "touchPadArea"
68 objectName: "touchPadArea"
53 anchors.fill: parent
69 anchors.fill: parent
@@ -229,7 +245,7 @@ Item {
229 InputMethod {
245 InputMethod {
230 id: inputMethod
246 id: inputMethod
231 // Don't resize when there is only one screen to avoid resize clashing with the InputMethod in the Shell.
247 // Don't resize when there is only one screen to avoid resize clashing with the InputMethod in the Shell.
232− enabled: screens.count > 1 && inputMethodState.oskEnabled
248+ enabled: screens.count > 1 && inputMethodState.oskEnabled && !tutorial.running
233 objectName: "inputMethod"
249 objectName: "inputMethod"
234 anchors.fill: parent
250 anchors.fill: parent
235 }
251 }
@@ -294,7 +310,6 @@ Item {
294 PauseAnimation { duration: 100 } // it takes a bit until pausing actually takes effect
310 PauseAnimation { duration: 100 } // it takes a bit until pausing actually takes effect
295 UbuntuNumberAnimation { targets: [tutorialLabel, tutorialImage]; property: "opacity"; to: 0; duration: UbuntuAnimation.FastDuration }
311 UbuntuNumberAnimation { targets: [tutorialLabel, tutorialImage]; property: "opacity"; to: 0; duration: UbuntuAnimation.FastDuration }
296
312
297− PauseAnimation { duration: UbuntuAnimation.SleepyDuration }
298 UbuntuNumberAnimation { target: leftButton; property: "opacity"; to: 1 }
313 UbuntuNumberAnimation { target: leftButton; property: "opacity"; to: 1 }
299 UbuntuNumberAnimation { target: rightButton; property: "opacity"; to: 1 }
314 UbuntuNumberAnimation { target: rightButton; property: "opacity"; to: 1 }
300
315
src/ShellApplication.cpp+1
@@ -36,6 +36,7 @@ ShellApplication::ShellApplication(int & argc, char ** argv, bool isMirServer)
36{
36{
37
37
38 setApplicationName(QStringLiteral("unity8"));
38 setApplicationName(QStringLiteral("unity8"));
39+ setOrganizationName(QStringLiteral("Canonical"));
39
40
40 connect(this, &QGuiApplication::screenAdded, this, &ShellApplication::onScreenAdded);
41 connect(this, &QGuiApplication::screenAdded, this, &ShellApplication::onScreenAdded);
41
42