Merge lp:~lukas-kde/unity8/fix-shell-chrome into lp:unity8
- fix-shell-chrome
- Merge into trunk
Status: | Merged | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Approved by: | Michał Sawicz | ||||||||||||||||
Approved revision: | 2851 | ||||||||||||||||
Merged at revision: | 2851 | ||||||||||||||||
Proposed branch: | lp:~lukas-kde/unity8/fix-shell-chrome | ||||||||||||||||
Merge into: | lp:unity8 | ||||||||||||||||
Diff against target: |
360 lines (+56/-59) 9 files modified
qml/Stage/ApplicationWindow.qml (+1/-0) qml/Stage/Stage.qml (+21/-11) qml/Stage/StagedFullscreenPolicy.qml (+7/-13) qml/Stage/WindowStateSaver.qml (+4/-3) qml/Stage/WindowedFullscreenPolicy.qml (+4/-12) tests/mocks/Unity/Application/ApplicationManager.cpp (+1/-0) tests/qmltests/Stage/tst_DesktopStage.qml (+3/-3) tests/qmltests/tst_OrientedShell.qml (+5/-3) tests/qmltests/tst_Shell.qml (+10/-14) |
||||||||||||||||
To merge this branch: | bzr merge lp:~lukas-kde/unity8/fix-shell-chrome | ||||||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Unity8 CI Bot | continuous-integration | Approve | |
Michael Zanetti (community) | Approve | ||
Daniel d'Andrada (community) | Needs Information | ||
Review via email: mp+318015@code.launchpad.net |
This proposal supersedes a proposal from 2017-02-22.
Commit message
Shell chrome fixes
Correctly save and load the window state from storage, do not restore our QML window right away but queue the state, filter it with the shell chrome policy (when in windowed mode) later on, and then apply it at altogether, once the surface creation is settled.
For a more elegant longterm fix, we should probably introduce "initialSurface
Description of the change
Shell chrome fixes
Daniel d'Andrada (dandrader) wrote : Posted in a previous version of this proposal | # |
Daniel d'Andrada (dandrader) wrote : Posted in a previous version of this proposal | # |
would be great if you could split the timer hack from the other, uncontroversial, proper fixes.
Lukáš Tinkl (lukas-kde) wrote : | # |
No, I can't really split them, since they need to come in this specific order (as written in the description).
As for the interval... yup it's not pretty, but given all the different timers and (blocking) queued connections we have in QML and qtmir, it has to be "high" enough so that it doesn't interfere with the internal state changes.
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2835
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2835
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2836
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Michael Zanetti (mzanetti) wrote : | # |
hmm... a couple of questions:
* A timer of 1 second seems quite long. Is that really what we want?
* afaict, this change now only loads the windowstatestorage stuff if we're starting up in windowed mode. However, it should still load the windowedX/
Lukáš Tinkl (lukas-kde) wrote : | # |
> hmm... a couple of questions:
>
> * A timer of 1 second seems quite long. Is that really what we want?
Well yes :/ try lowering the value and see it fail more and more often.
> * afaict, this change now only loads the windowstatestorage stuff if we're
> starting up in windowed mode. However, it should still load the
> windowedX/
> yet while we're in staged mode. Once we're switching from staged to windowed,
> it should then use the previously loaded stuff.
Correct, fixed that
Michael Zanetti (mzanetti) wrote : | # |
> > hmm... a couple of questions:
> >
> > * A timer of 1 second seems quite long. Is that really what we want?
>
> Well yes :/ try lowering the value and see it fail more and more often.
Hmm... I'm not entirely happy with that... can't we somehow trigger this as a result of the other stuff being finished instead of having a timer that is a) so slow, it's visible to the user, and b) might still fail if the machine is under load or something...
Daniel d'Andrada (dandrader) wrote : | # |
> > > hmm... a couple of questions:
> > >
> > > * A timer of 1 second seems quite long. Is that really what we want?
> >
> > Well yes :/ try lowering the value and see it fail more and more often.
>
> Hmm... I'm not entirely happy with that... can't we somehow trigger this as a
> result of the other stuff being finished instead of having a timer that is a)
> so slow, it's visible to the user, and b) might still fail if the machine is
> under load or something...
+1
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2837
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2838
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Daniel d'Andrada (dandrader) wrote : | # |
In qml/Stage/
"""
Binding {
target: root.application
property: "initialSurface
value: Qt.size(
+ when: d.surfaceInitia
}
"""
This doesn't make sense to me. initialSurfaceSize is only useful if it's correctly set *before* the surface is created.
Lukáš Tinkl (lukas-kde) wrote : | # |
> This doesn't make sense to me. initialSurfaceSize is only useful if it's
> correctly set *before* the surface is created.
Fixed
Daniel d'Andrada (dandrader) wrote : | # |
What about this:
http://
I think it's better to avoid creating yet another property in Stage.qml if possible. Specially since this one is only used once during initialization and never again. And its name gives the impression it affects the window state throughout the delegate's lifetime
Daniel d'Andrada (dandrader) wrote : | # |
If I understood correctly all you need is to wait until the surface shows up so that you can query its shellChrome property, right?
In which case you can just consult appDelegate.
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:2840
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Lukáš Tinkl (lukas-kde) wrote : | # |
> What about this:
> http://
>
> I think it's better to avoid creating yet another property in Stage.qml if
> possible. Specially since this one is only used once during initialization and
> never again. And its name gives the impression it affects the window state
> throughout the delegate's lifetime
Makes sense yeah, merged in
Lukáš Tinkl (lukas-kde) wrote : | # |
> If I understood correctly all you need is to wait until the surface shows up
> so that you can query its shellChrome property, right?
Not only that, if I don't wait for surfaceInitialized, then requesting a new (loaded/policy) state does not work :/ I tried that
> In which case you can just consult appDelegate.
> available instead of exposing surfaceInitialized from ApplicationWindow.
Daniel d'Andrada (dandrader) wrote : | # |
On 24/02/2017 10:49, Lukáš Tinkl wrote:
>> If I understood correctly all you need is to wait until the surface shows up
>> so that you can query its shellChrome property, right?
> Not only that, if I don't wait for surfaceInitialized, then requesting a new (loaded/policy) state does not work :/ I tried that
Interesting.
Calling window.
a surface. As the request gets cached and applied once window finally
receives a surface. But that's not really relevant in this case as you
have to wait for the surface.shellChrome value anyway. But good to keep
in mind.
This might be related to the fact that the SurfaceContainer inside
ApplicationWindow is only made visible once "surface !== null &&
d.surfaceInitia
When you request a state, it really should work. Worth investigating
what's going on in qtmir and miral.
A insivible MirSurfaceItem make its MirSurface visibility state go to
hidden. Maybe miral ignores certain state change requests for a surface
that is not exposed.
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2844
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2846
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:2847
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:2848
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Michael Zanetti (mzanetti) wrote : | # |
code makes mostly sense. One issue is that with this change, the position/size is only stored when an app is closed in windowed mode. This leads to the following situation:
* open an app, drag it to somewhere, close it
* restart the app, it will open where you closed it, so far so good.
* move the app around
* switch to staged mode
* close the app
* switch to windowed mode
* restart the app => it will open at the old saved position instead of the last one where it was moved to
Lukáš Tinkl (lukas-kde) wrote : | # |
> code makes mostly sense. One issue is that with this change, the position/size
> is only stored when an app is closed in windowed mode. This leads to the
> following situation:
>
> * open an app, drag it to somewhere, close it
> * restart the app, it will open where you closed it, so far so good.
> * move the app around
> * switch to staged mode
> * close the app
> * switch to windowed mode
> * restart the app => it will open at the old saved position instead of the
> last one where it was moved to
Fixed
Michael Zanetti (mzanetti) wrote : | # |
works fine now. I get this warning in tryShell:
file://
perhaps worth fixing too
Michael Zanetti (mzanetti) wrote : | # |
ok. looks good to me now. waiting for CI for top-approval
Lukáš Tinkl (lukas-kde) wrote : | # |
> works fine now. I get this warning in tryShell:
>
> file://
> chrome/
> 'shellChrome' of null
>
> perhaps worth fixing too
Warning fixed too
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:2849
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2850
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:2850
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2850
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2850
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2850
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:2850
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2850
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2850
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2850
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2850
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:2850
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2851
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2851
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:2851
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Preview Diff
1 | === modified file 'qml/Stage/ApplicationWindow.qml' | |||
2 | --- qml/Stage/ApplicationWindow.qml 2016-09-22 14:17:39 +0000 | |||
3 | +++ qml/Stage/ApplicationWindow.qml 2017-03-02 13:00:45 +0000 | |||
4 | @@ -28,6 +28,7 @@ | |||
5 | 28 | property bool orientationChangesEnabled: d.supportsSurfaceResize ? d.surfaceOldEnoughToBeResized : true | 28 | property bool orientationChangesEnabled: d.supportsSurfaceResize ? d.surfaceOldEnoughToBeResized : true |
6 | 29 | readonly property string title: surface && surface.name !== "" ? surface.name : d.name | 29 | readonly property string title: surface && surface.name !== "" ? surface.name : d.name |
7 | 30 | readonly property QtObject focusedSurface: d.focusedSurface.surface | 30 | readonly property QtObject focusedSurface: d.focusedSurface.surface |
8 | 31 | readonly property alias surfaceInitialized: d.surfaceInitialized | ||
9 | 31 | 32 | ||
10 | 32 | // to be set from outside | 33 | // to be set from outside |
11 | 33 | property QtObject surface | 34 | property QtObject surface |
12 | 34 | 35 | ||
13 | === modified file 'qml/Stage/Stage.qml' | |||
14 | --- qml/Stage/Stage.qml 2017-02-16 13:44:45 +0000 | |||
15 | +++ qml/Stage/Stage.qml 2017-03-02 13:00:45 +0000 | |||
16 | @@ -470,7 +470,7 @@ | |||
17 | 470 | extend: "stagedRightEdge" | 470 | extend: "stagedRightEdge" |
18 | 471 | PropertyChanges { | 471 | PropertyChanges { |
19 | 472 | target: sideStage | 472 | target: sideStage |
21 | 473 | opacity: priv.sideStageDelegate.x === sideStage.x ? 1 : 0 | 473 | opacity: priv.sideStageDelegate && priv.sideStageDelegate.x === sideStage.x ? 1 : 0 |
22 | 474 | visible: true | 474 | visible: true |
23 | 475 | } | 475 | } |
24 | 476 | }, | 476 | }, |
25 | @@ -723,6 +723,7 @@ | |||
26 | 723 | // miral doesn't know about our window decorations. So we have to deduct them | 723 | // miral doesn't know about our window decorations. So we have to deduct them |
27 | 724 | value: Qt.point(appDelegate.requestedX + appDelegate.clientAreaItem.x, | 724 | value: Qt.point(appDelegate.requestedX + appDelegate.clientAreaItem.x, |
28 | 725 | appDelegate.requestedY + appDelegate.clientAreaItem.y) | 725 | appDelegate.requestedY + appDelegate.clientAreaItem.y) |
29 | 726 | when: root.mode == "windowed" | ||
30 | 726 | } | 727 | } |
31 | 727 | 728 | ||
32 | 728 | // In those are for windowed mode. Those values basically store the window's properties | 729 | // In those are for windowed mode. Those values basically store the window's properties |
33 | @@ -768,7 +769,6 @@ | |||
34 | 768 | Math.max(0, priv.virtualKeyboardHeight - (appContainer.height - (appDelegate.requestedY + appDelegate.height)))) | 769 | Math.max(0, priv.virtualKeyboardHeight - (appContainer.height - (appDelegate.requestedY + appDelegate.height)))) |
35 | 769 | when: root.oskEnabled && appDelegate.focus && (appDelegate.state == "normal" || appDelegate.state == "restored") | 770 | when: root.oskEnabled && appDelegate.focus && (appDelegate.state == "normal" || appDelegate.state == "restored") |
36 | 770 | && root.inputMethodRect.height > 0 | 771 | && root.inputMethodRect.height > 0 |
37 | 771 | |||
38 | 772 | } | 772 | } |
39 | 773 | 773 | ||
40 | 774 | Behavior on x { id: xBehavior; enabled: priv.closingIndex >= 0; UbuntuNumberAnimation { onRunningChanged: if (!running) priv.closingIndex = -1} } | 774 | Behavior on x { id: xBehavior; enabled: priv.closingIndex >= 0; UbuntuNumberAnimation { onRunningChanged: if (!running) priv.closingIndex = -1} } |
41 | @@ -933,7 +933,8 @@ | |||
42 | 933 | } else if (model.window.state === Mir.MaximizedBottomRightState) { | 933 | } else if (model.window.state === Mir.MaximizedBottomRightState) { |
43 | 934 | appDelegate.maximizeBottomRight(); | 934 | appDelegate.maximizeBottomRight(); |
44 | 935 | } else if (model.window.state === Mir.RestoredState) { | 935 | } else if (model.window.state === Mir.RestoredState) { |
46 | 936 | if (appDelegate.fullscreen && appDelegate.prevWindowState != WindowStateStorage.WindowStateRestored) { | 936 | if (appDelegate.fullscreen && appDelegate.prevWindowState != WindowStateStorage.WindowStateRestored |
47 | 937 | && appDelegate.prevWindowState != WindowStateStorage.WindowStateNormal) { | ||
48 | 937 | model.window.requestState(WindowStateStorage.toMirState(appDelegate.prevWindowState)); | 938 | model.window.requestState(WindowStateStorage.toMirState(appDelegate.prevWindowState)); |
49 | 938 | } else { | 939 | } else { |
50 | 939 | appDelegate.restore(); | 940 | appDelegate.restore(); |
51 | @@ -945,6 +946,21 @@ | |||
52 | 945 | } | 946 | } |
53 | 946 | } | 947 | } |
54 | 947 | 948 | ||
55 | 949 | readonly property bool windowReady: clientAreaItem.surfaceInitialized | ||
56 | 950 | onWindowReadyChanged: { | ||
57 | 951 | if (windowReady) { | ||
58 | 952 | var loadedMirState = WindowStateStorage.toMirState(windowStateSaver.loadedState); | ||
59 | 953 | // need to apply the shell chrome policy on top the saved window state | ||
60 | 954 | var policy; | ||
61 | 955 | if (root.mode == "windowed") { | ||
62 | 956 | policy = windowedFullscreenPolicy; | ||
63 | 957 | } else { | ||
64 | 958 | policy = stagedFullscreenPolicy | ||
65 | 959 | } | ||
66 | 960 | window.requestState(policy.applyPolicy(loadedMirState, surface.shellChrome)); | ||
67 | 961 | } | ||
68 | 962 | } | ||
69 | 963 | |||
70 | 948 | Component.onCompleted: { | 964 | Component.onCompleted: { |
71 | 949 | if (application && application.rotatesWindowContents) { | 965 | if (application && application.rotatesWindowContents) { |
72 | 950 | decoratedWindow.surfaceOrientationAngle = shellOrientationAngle; | 966 | decoratedWindow.surfaceOrientationAngle = shellOrientationAngle; |
73 | @@ -957,7 +973,6 @@ | |||
74 | 957 | windowedY = priv.focusedAppDelegate ? priv.focusedAppDelegate.windowedY + units.gu(3) : normalZ * units.gu(3) | 973 | windowedY = priv.focusedAppDelegate ? priv.focusedAppDelegate.windowedY + units.gu(3) : normalZ * units.gu(3) |
75 | 958 | // Now load any saved state. This needs to happen *after* the cascading! | 974 | // Now load any saved state. This needs to happen *after* the cascading! |
76 | 959 | windowStateSaver.load(); | 975 | windowStateSaver.load(); |
77 | 960 | model.window.requestState(WindowStateStorage.toMirState(windowState)); | ||
78 | 961 | 976 | ||
79 | 962 | updateQmlFocusFromMirSurfaceFocus(); | 977 | updateQmlFocusFromMirSurfaceFocus(); |
80 | 963 | 978 | ||
81 | @@ -1441,7 +1456,7 @@ | |||
82 | 1441 | ] | 1456 | ] |
83 | 1442 | transitions: [ | 1457 | transitions: [ |
84 | 1443 | Transition { | 1458 | Transition { |
86 | 1444 | from: "staged,stagedWithSideStage"; to: "normal" | 1459 | from: "staged,stagedWithSideStage" |
87 | 1445 | enabled: appDelegate.animationsEnabled | 1460 | enabled: appDelegate.animationsEnabled |
88 | 1446 | PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" } | 1461 | PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" } |
89 | 1447 | UbuntuNumberAnimation { target: appDelegate; properties: "x,y,requestedX,requestedY,opacity,requestedWidth,requestedHeight,scale"; duration: priv.animationDuration } | 1462 | UbuntuNumberAnimation { target: appDelegate; properties: "x,y,requestedX,requestedY,opacity,requestedWidth,requestedHeight,scale"; duration: priv.animationDuration } |
90 | @@ -1462,8 +1477,7 @@ | |||
91 | 1462 | }, | 1477 | }, |
92 | 1463 | Transition { | 1478 | Transition { |
93 | 1464 | from: "normal,staged"; to: "stagedWithSideStage" | 1479 | from: "normal,staged"; to: "stagedWithSideStage" |
96 | 1465 | UbuntuNumberAnimation { target: appDelegate; properties: "x,y"; duration: priv.animationDuration } | 1480 | UbuntuNumberAnimation { target: appDelegate; properties: "x,y,requestedWidth,requestedHeight"; duration: priv.animationDuration } |
95 | 1466 | UbuntuNumberAnimation { target: appDelegate; properties: "requestedWidth,requestedHeight"; duration: priv.animationDuration } | ||
97 | 1467 | }, | 1481 | }, |
98 | 1468 | Transition { | 1482 | Transition { |
99 | 1469 | to: "windowedRightEdge" | 1483 | to: "windowedRightEdge" |
100 | @@ -1503,7 +1517,6 @@ | |||
101 | 1503 | from: ",normal,restored,maximized,maximizedLeft,maximizedRight,maximizedTopLeft,maximizedTopRight,maximizedBottomLeft,maximizedBottomRight,maximizedHorizontally,maximizedVertically,fullscreen" | 1517 | from: ",normal,restored,maximized,maximizedLeft,maximizedRight,maximizedTopLeft,maximizedTopRight,maximizedBottomLeft,maximizedBottomRight,maximizedHorizontally,maximizedVertically,fullscreen" |
102 | 1504 | to: "minimized" | 1518 | to: "minimized" |
103 | 1505 | SequentialAnimation { | 1519 | SequentialAnimation { |
104 | 1506 | ScriptAction { script: print("transitioning:", appDelegate.x, appDelegate.y, appDelegate.scale) } | ||
105 | 1507 | ScriptAction { script: { fakeRectangle.stop(); } } | 1520 | ScriptAction { script: { fakeRectangle.stop(); } } |
106 | 1508 | PropertyAction { target: appDelegate; property: "visuallyMaximized" } | 1521 | PropertyAction { target: appDelegate; property: "visuallyMaximized" } |
107 | 1509 | UbuntuNumberAnimation { target: appDelegate; properties: "x,y,scale,opacity"; duration: priv.animationDuration } | 1522 | UbuntuNumberAnimation { target: appDelegate; properties: "x,y,scale,opacity"; duration: priv.animationDuration } |
108 | @@ -1514,7 +1527,6 @@ | |||
109 | 1514 | from: "minimized" | 1527 | from: "minimized" |
110 | 1515 | to: ",normal,restored,maximized,maximizedLeft,maximizedRight,maximizedTopLeft,maximizedTopRight,maximizedBottomLeft,maximizedBottomRight,maximizedHorizontally,maximizedVertically,fullscreen" | 1528 | to: ",normal,restored,maximized,maximizedLeft,maximizedRight,maximizedTopLeft,maximizedTopRight,maximizedBottomLeft,maximizedBottomRight,maximizedHorizontally,maximizedVertically,fullscreen" |
111 | 1516 | SequentialAnimation { | 1529 | SequentialAnimation { |
112 | 1517 | ScriptAction { script: print("transitioning:", appDelegate.x, appDelegate.y, appDelegate.scale) } | ||
113 | 1518 | PropertyAction { target: appDelegate; property: "visuallyMinimized,z" } | 1530 | PropertyAction { target: appDelegate; property: "visuallyMinimized,z" } |
114 | 1519 | ParallelAnimation { | 1531 | ParallelAnimation { |
115 | 1520 | UbuntuNumberAnimation { target: appDelegate; properties: "x"; from: -appDelegate.width / 2; duration: priv.animationDuration } | 1532 | UbuntuNumberAnimation { target: appDelegate; properties: "x"; from: -appDelegate.width / 2; duration: priv.animationDuration } |
116 | @@ -1661,8 +1673,6 @@ | |||
117 | 1661 | 1673 | ||
118 | 1662 | WindowedFullscreenPolicy { | 1674 | WindowedFullscreenPolicy { |
119 | 1663 | id: windowedFullscreenPolicy | 1675 | id: windowedFullscreenPolicy |
120 | 1664 | active: root.mode == "windowed" | ||
121 | 1665 | surface: model.window.surface | ||
122 | 1666 | } | 1676 | } |
123 | 1667 | StagedFullscreenPolicy { | 1677 | StagedFullscreenPolicy { |
124 | 1668 | id: stagedFullscreenPolicy | 1678 | id: stagedFullscreenPolicy |
125 | 1669 | 1679 | ||
126 | === modified file 'qml/Stage/StagedFullscreenPolicy.qml' | |||
127 | --- qml/Stage/StagedFullscreenPolicy.qml 2016-11-30 19:24:02 +0000 | |||
128 | +++ qml/Stage/StagedFullscreenPolicy.qml 2017-03-02 13:00:45 +0000 | |||
129 | @@ -28,14 +28,14 @@ | |||
130 | 28 | QtObject { | 28 | QtObject { |
131 | 29 | property bool active: true | 29 | property bool active: true |
132 | 30 | 30 | ||
133 | 31 | function applyPolicy(surfaceState, surfaceChrome) { | ||
134 | 32 | if (surfaceChrome === Mir.LowChrome) { | ||
135 | 33 | return Mir.FullscreenState; | ||
136 | 34 | } | ||
137 | 35 | return surfaceState; | ||
138 | 36 | } | ||
139 | 37 | |||
140 | 31 | property var surface: null | 38 | property var surface: null |
141 | 32 | onSurfaceChanged: { | ||
142 | 33 | if (!active || !surface) return; | ||
143 | 34 | if (surface.shellChrome === Mir.LowChrome) { | ||
144 | 35 | surface.requestState(Mir.FullscreenState); | ||
145 | 36 | } | ||
146 | 37 | } | ||
147 | 38 | |||
148 | 39 | property var _connections: Connections { | 39 | property var _connections: Connections { |
149 | 40 | target: surface | 40 | target: surface |
150 | 41 | onShellChromeChanged: { | 41 | onShellChromeChanged: { |
151 | @@ -46,11 +46,5 @@ | |||
152 | 46 | surface.requestState(Mir.RestoredState); | 46 | surface.requestState(Mir.RestoredState); |
153 | 47 | } | 47 | } |
154 | 48 | } | 48 | } |
155 | 49 | onStateChanged: { | ||
156 | 50 | if (!active) return; | ||
157 | 51 | if (surface.state === Mir.RestoredState && surface.shellChrome === Mir.LowChrome) { | ||
158 | 52 | surface.requestState(Mir.FullscreenState); | ||
159 | 53 | } | ||
160 | 54 | } | ||
161 | 55 | } | 49 | } |
162 | 56 | } | 50 | } |
163 | 57 | 51 | ||
164 | === modified file 'qml/Stage/WindowStateSaver.qml' | |||
165 | --- qml/Stage/WindowStateSaver.qml 2016-11-23 18:43:48 +0000 | |||
166 | +++ qml/Stage/WindowStateSaver.qml 2017-03-02 13:00:45 +0000 | |||
167 | @@ -28,6 +28,8 @@ | |||
168 | 28 | property int leftMargin: 0 | 28 | property int leftMargin: 0 |
169 | 29 | property int minimumY: 0 | 29 | property int minimumY: 0 |
170 | 30 | 30 | ||
171 | 31 | property int loadedState | ||
172 | 32 | |||
173 | 31 | function load() { | 33 | function load() { |
174 | 32 | var defaultWidth = units.gu(60); | 34 | var defaultWidth = units.gu(60); |
175 | 33 | var defaultHeight = units.gu(50); | 35 | var defaultHeight = units.gu(50); |
176 | @@ -41,14 +43,13 @@ | |||
177 | 41 | (target.fullscreen ? 0 : root.leftMargin)); }); | 43 | (target.fullscreen ? 0 : root.leftMargin)); }); |
178 | 42 | target.windowedY = Qt.binding(function() { return Math.max(Math.min(windowGeometry.y, screenHeight - target.windowedHeight), minimumY); }); | 44 | target.windowedY = Qt.binding(function() { return Math.max(Math.min(windowGeometry.y, screenHeight - target.windowedHeight), minimumY); }); |
179 | 43 | 45 | ||
180 | 44 | var windowState = WindowStateStorage.getState(target.appId, WindowStateStorage.WindowStateNormal) | ||
181 | 45 | target.restore(false /* animated */, windowState); | ||
182 | 46 | |||
183 | 47 | target.updateNormalGeometry(); | 46 | target.updateNormalGeometry(); |
184 | 48 | 47 | ||
185 | 49 | // initialize the x/y to restore to | 48 | // initialize the x/y to restore to |
186 | 50 | target.restoredX = target.normalX; | 49 | target.restoredX = target.normalX; |
187 | 51 | target.restoredY = target.normalY; | 50 | target.restoredY = target.normalY; |
188 | 51 | |||
189 | 52 | loadedState = WindowStateStorage.getState(target.appId, WindowStateStorage.WindowStateNormal); | ||
190 | 52 | } | 53 | } |
191 | 53 | 54 | ||
192 | 54 | function save() { | 55 | function save() { |
193 | 55 | 56 | ||
194 | === modified file 'qml/Stage/WindowedFullscreenPolicy.qml' | |||
195 | --- qml/Stage/WindowedFullscreenPolicy.qml 2016-11-30 19:24:02 +0000 | |||
196 | +++ qml/Stage/WindowedFullscreenPolicy.qml 2017-03-02 13:00:45 +0000 | |||
197 | @@ -22,18 +22,10 @@ | |||
198 | 22 | // On first surface load; if the surface is set to low chrome & fullscreen, the | 22 | // On first surface load; if the surface is set to low chrome & fullscreen, the |
199 | 23 | // state of the window is returned to restored. | 23 | // state of the window is returned to restored. |
200 | 24 | QtObject { | 24 | QtObject { |
213 | 25 | property bool active: true | 25 | function applyPolicy(surfaceState, surfaceChrome) { |
214 | 26 | property QtObject surface: null | 26 | if (surfaceState === Mir.FullscreenState && surfaceChrome === Mir.LowChrome) { |
215 | 27 | 27 | return Mir.RestoredState; | |
204 | 28 | property bool _firstTimeSurface: true | ||
205 | 29 | |||
206 | 30 | onSurfaceChanged: { | ||
207 | 31 | if (!active || !surface) return; | ||
208 | 32 | if (!_firstTimeSurface) return; | ||
209 | 33 | _firstTimeSurface = false; | ||
210 | 34 | |||
211 | 35 | if (surface.state === Mir.FullscreenState && surface.shellChrome === Mir.LowChrome) { | ||
212 | 36 | surface.requestState(Mir.RestoredState); | ||
216 | 37 | } | 28 | } |
217 | 29 | return surfaceState; | ||
218 | 38 | } | 30 | } |
219 | 39 | } | 31 | } |
220 | 40 | 32 | ||
221 | === modified file 'tests/mocks/Unity/Application/ApplicationManager.cpp' | |||
222 | --- tests/mocks/Unity/Application/ApplicationManager.cpp 2017-01-26 11:10:01 +0000 | |||
223 | +++ tests/mocks/Unity/Application/ApplicationManager.cpp 2017-03-02 13:00:45 +0000 | |||
224 | @@ -337,6 +337,7 @@ | |||
225 | 337 | application->setScreenshotId("camera"); | 337 | application->setScreenshotId("camera"); |
226 | 338 | application->setIconId("camera"); | 338 | application->setIconId("camera"); |
227 | 339 | application->setFullscreen(true); | 339 | application->setFullscreen(true); |
228 | 340 | application->setShellChrome(Mir::LowChrome); | ||
229 | 340 | application->setSupportedOrientations(Qt::PortraitOrientation | 341 | application->setSupportedOrientations(Qt::PortraitOrientation |
230 | 341 | | Qt::LandscapeOrientation | 342 | | Qt::LandscapeOrientation |
231 | 342 | | Qt::InvertedPortraitOrientation | 343 | | Qt::InvertedPortraitOrientation |
232 | 343 | 344 | ||
233 | === modified file 'tests/qmltests/Stage/tst_DesktopStage.qml' | |||
234 | --- tests/qmltests/Stage/tst_DesktopStage.qml 2017-02-16 13:43:56 +0000 | |||
235 | +++ tests/qmltests/Stage/tst_DesktopStage.qml 2017-03-02 13:00:45 +0000 | |||
236 | @@ -321,7 +321,7 @@ | |||
237 | 321 | var maximizeButton = findChild(appDelegate, "maximizeWindowButton"); | 321 | var maximizeButton = findChild(appDelegate, "maximizeWindowButton"); |
238 | 322 | verify(maximizeButton); | 322 | verify(maximizeButton); |
239 | 323 | mouseClick(maximizeButton); | 323 | mouseClick(maximizeButton); |
241 | 324 | tryCompare(appDelegate, "visuallyMaximized", true); | 324 | tryCompare(appDelegate, "maximized", true); |
242 | 325 | } | 325 | } |
243 | 326 | 326 | ||
244 | 327 | function test_tappingOnDecorationFocusesApplication(data) { | 327 | function test_tappingOnDecorationFocusesApplication(data) { |
245 | @@ -637,7 +637,7 @@ | |||
246 | 637 | var dialerAppDelegate = startApplication("dialer-app"); | 637 | var dialerAppDelegate = startApplication("dialer-app"); |
247 | 638 | 638 | ||
248 | 639 | // verify the drop shadow becomes visible | 639 | // verify the drop shadow becomes visible |
250 | 640 | verify(PanelState.dropShadow == true); | 640 | tryCompareFunction(function() { return PanelState.dropShadow; }, true); |
251 | 641 | 641 | ||
252 | 642 | // close the maximized app | 642 | // close the maximized app |
253 | 643 | ApplicationManager.stopApplication("facebook-webapp"); | 643 | ApplicationManager.stopApplication("facebook-webapp"); |
254 | @@ -785,7 +785,7 @@ | |||
255 | 785 | waitUntilTransitionsEnd(dialerAppDelegate); | 785 | waitUntilTransitionsEnd(dialerAppDelegate); |
256 | 786 | waitUntilTransitionsEnd(stage); | 786 | waitUntilTransitionsEnd(stage); |
257 | 787 | 787 | ||
259 | 788 | tryCompare(dialerAppDelegate, "state", "maximized"); | 788 | tryCompare(dialerAppDelegate, "maximized", true); |
260 | 789 | } | 789 | } |
261 | 790 | 790 | ||
262 | 791 | function test_saveRestoreSize() { | 791 | function test_saveRestoreSize() { |
263 | 792 | 792 | ||
264 | === modified file 'tests/qmltests/tst_OrientedShell.qml' | |||
265 | --- tests/qmltests/tst_OrientedShell.qml 2017-01-26 12:57:39 +0000 | |||
266 | +++ tests/qmltests/tst_OrientedShell.qml 2017-03-02 13:00:45 +0000 | |||
267 | @@ -695,9 +695,11 @@ | |||
268 | 695 | // false -> true -> false | 695 | // false -> true -> false |
269 | 696 | compare(transitionSpy.count, 2); | 696 | compare(transitionSpy.count, 2); |
270 | 697 | 697 | ||
274 | 698 | // It should retain native dimensions regardless of its rotation/orientation | 698 | if (!data.windowed) { // subject to shell-chrome policies |
275 | 699 | compare(cameraSurface.width, orientedShell.width); | 699 | // It should retain native dimensions regardless of its rotation/orientation |
276 | 700 | compare(cameraSurface.height, orientedShell.height); | 700 | compare(cameraSurface.width, orientedShell.width); |
277 | 701 | compare(cameraSurface.height, orientedShell.height); | ||
278 | 702 | } | ||
279 | 701 | 703 | ||
280 | 702 | // Surface focus shouldn't have been touched because of the rotation | 704 | // Surface focus shouldn't have been touched because of the rotation |
281 | 703 | compare(focusChangedSpy.count, 0); | 705 | compare(focusChangedSpy.count, 0); |
282 | 704 | 706 | ||
283 | === modified file 'tests/qmltests/tst_Shell.qml' | |||
284 | --- tests/qmltests/tst_Shell.qml 2017-02-16 13:46:11 +0000 | |||
285 | +++ tests/qmltests/tst_Shell.qml 2017-03-02 13:00:45 +0000 | |||
286 | @@ -334,7 +334,7 @@ | |||
287 | 334 | 334 | ||
288 | 335 | Row { | 335 | Row { |
289 | 336 | CheckBox { | 336 | CheckBox { |
291 | 337 | id: fullscreeAppCheck | 337 | id: fullscreenAppCheck |
292 | 338 | activeFocusOnPress: false | 338 | activeFocusOnPress: false |
293 | 339 | activeFocusOnTab: false | 339 | activeFocusOnTab: false |
294 | 340 | 340 | ||
295 | @@ -348,13 +348,10 @@ | |||
296 | 348 | } | 348 | } |
297 | 349 | 349 | ||
298 | 350 | Binding { | 350 | Binding { |
300 | 351 | target: fullscreeAppCheck | 351 | target: fullscreenAppCheck |
301 | 352 | when: topLevelSurfaceList && topLevelSurfaceList.focusedWindow | 352 | when: topLevelSurfaceList && topLevelSurfaceList.focusedWindow |
302 | 353 | property: "checked" | 353 | property: "checked" |
307 | 354 | value: { | 354 | value: topLevelSurfaceList.focusedWindow.state === Mir.FullscreenState |
304 | 355 | if (!topLevelSurfaceList || !topLevelSurfaceList.focusedWindow) return false; | ||
305 | 356 | return topLevelSurfaceList.focusedWindow.state === Mir.FullscreenState | ||
306 | 357 | } | ||
308 | 358 | } | 355 | } |
309 | 359 | } | 356 | } |
310 | 360 | Label { | 357 | Label { |
311 | @@ -365,6 +362,8 @@ | |||
312 | 365 | Row { | 362 | Row { |
313 | 366 | CheckBox { | 363 | CheckBox { |
314 | 367 | id: chromeAppCheck | 364 | id: chromeAppCheck |
315 | 365 | activeFocusOnPress: false | ||
316 | 366 | activeFocusOnTab: false | ||
317 | 368 | 367 | ||
318 | 369 | onTriggered: { | 368 | onTriggered: { |
319 | 370 | if (!topLevelSurfaceList.focusedWindow || !topLevelSurfaceList.focusedWindow.surface) return; | 369 | if (!topLevelSurfaceList.focusedWindow || !topLevelSurfaceList.focusedWindow.surface) return; |
320 | @@ -380,10 +379,8 @@ | |||
321 | 380 | target: chromeAppCheck | 379 | target: chromeAppCheck |
322 | 381 | when: topLevelSurfaceList && topLevelSurfaceList.focusedWindow !== null && topLevelSurfaceList.focusedWindow.surface !== null | 380 | when: topLevelSurfaceList && topLevelSurfaceList.focusedWindow !== null && topLevelSurfaceList.focusedWindow.surface !== null |
323 | 382 | property: "checked" | 381 | property: "checked" |
328 | 383 | value: { | 382 | value: topLevelSurfaceList.focusedWindow.surface && |
329 | 384 | if (!topLevelSurfaceList || !topLevelSurfaceList.focusedWindow || !topLevelSurfaceList.focusedWindow.surface) return false; | 383 | topLevelSurfaceList.focusedWindow.surface.shellChrome === Mir.LowChrome |
326 | 385 | topLevelSurfaceList.focusedWindow.surface.shellChrome === Mir.LowChrome | ||
327 | 386 | } | ||
330 | 387 | } | 384 | } |
331 | 388 | } | 385 | } |
332 | 389 | Label { | 386 | Label { |
333 | @@ -2294,7 +2291,6 @@ | |||
334 | 2294 | return [ | 2291 | return [ |
335 | 2295 | { tag: "phone" }, | 2292 | { tag: "phone" }, |
336 | 2296 | { tag: "tablet" }, | 2293 | { tag: "tablet" }, |
337 | 2297 | { tag: "desktop" }, | ||
338 | 2298 | ] | 2294 | ] |
339 | 2299 | } | 2295 | } |
340 | 2300 | 2296 | ||
341 | @@ -2674,8 +2670,8 @@ | |||
342 | 2674 | } | 2670 | } |
343 | 2675 | 2671 | ||
344 | 2676 | function test_cursorHidingWithFullscreenApp() { | 2672 | function test_cursorHidingWithFullscreenApp() { |
347 | 2677 | loadShell("desktop"); | 2673 | loadShell("phone"); |
348 | 2678 | shell.usageScenario = "desktop"; | 2674 | shell.usageScenario = "phone"; |
349 | 2679 | waitForRendering(shell); | 2675 | waitForRendering(shell); |
350 | 2680 | swipeAwayGreeter(); | 2676 | swipeAwayGreeter(); |
351 | 2681 | 2677 | ||
352 | @@ -2779,7 +2775,7 @@ | |||
353 | 2779 | tryCompare(stage, "state", "staged"); | 2775 | tryCompare(stage, "state", "staged"); |
354 | 2780 | 2776 | ||
355 | 2781 | // Try by Super+W | 2777 | // Try by Super+W |
357 | 2782 | keyPress(Qt.Key_W, Qt.MetaModifier) | 2778 | keyPress(Qt.Key_W, Qt.MetaModifier, 200); |
358 | 2783 | tryCompare(stage, "state", data.spreadEnabled ? "spread" : "staged"); | 2779 | tryCompare(stage, "state", data.spreadEnabled ? "spread" : "staged"); |
359 | 2784 | keyRelease(Qt.Key_W, Qt.MetaModifier) | 2780 | keyRelease(Qt.Key_W, Qt.MetaModifier) |
360 | 2785 | } | 2781 | } |
"""
interval: 1000
"""
Why 1000 and not 500 or 2000. Do you know what are you waiting for more exactly?