Merge lp:~lukas-kde/unity8/windowOpenCloseAnimations into lp:unity8
- windowOpenCloseAnimations
- Merge into trunk
Status: | Superseded | ||||
---|---|---|---|---|---|
Proposed branch: | lp:~lukas-kde/unity8/windowOpenCloseAnimations | ||||
Merge into: | lp:unity8 | ||||
Prerequisite: | lp:~mzanetti/unity8/launcher-sizing | ||||
Diff against target: |
558 lines (+209/-75) 10 files modified
plugins/Unity/Indicators/indicatorsmanager.cpp (+3/-5) qml/Panel/Indicators/MenuItemFactory.qml (+46/-0) qml/Stages/ApplicationWindow.qml (+5/-8) qml/Stages/DecoratedWindow.qml (+3/-6) qml/Stages/DesktopStage.qml (+135/-22) qml/Stages/SurfaceContainer.qml (+7/-26) qml/Stages/WindowResizeArea.qml (+5/-5) tests/qmltests/Stages/tst_DesktopStage.qml (+3/-3) tests/qmltests/Stages/tst_WindowResizeArea.qml (+1/-0) tests/qmltests/tst_Shell.qml (+1/-0) |
||||
To merge this branch: | bzr merge lp:~lukas-kde/unity8/windowOpenCloseAnimations | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Unity8 CI Bot | continuous-integration | Needs Fixing | |
Daniel d'Andrada (community) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Needs Fixing | |
Michael Terry | Pending | ||
Nick Dedekind | Pending | ||
Review via email: mp+284775@code.launchpad.net |
This proposal supersedes a proposal from 2016-01-08.
This proposal has been superseded by a proposal from 2016-02-17.
Commit message
Provide animations for windows opening/closing
Description of the change
Provide animations for windows opening/closing, as described by UX in the original bugreport.
* Are there any related MPs required for this MP to build/function as expected? Please list.
Yes, lp:~mzanetti/unity8/launcher-sizing
* Did you perform an exploratory manual test run of your code change and any related functionality?
Yes
* Did you make sure that your branch does not contain spurious tags?
Yes
* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
Yes
* If you changed the UI, has there been a design review?
Yes
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
Michael Terry (mterry) wrote : Posted in a previous version of this proposal | # |
- The app closing animation seems to "stick" on the last frame. Or not smoothly go down to zero opacity. Or something. It didn't look right on my mako.
- closeApplication() takes two arguments, normally only using the first one. It uses the appId if the first argument is not given, which is an odd construction. Maybe just drop the second argument completely, as it's never used?
Otherwise already looks nice. :)
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal | # |
> - The app closing animation seems to "stick" on the last frame. Or not
> smoothly go down to zero opacity. Or something. It didn't look right on my
> mako.
Agree, using the standard UbuntuNumberAni
> - closeApplication() takes two arguments, normally only using the first one.
> It uses the appId if the first argument is not given, which is an odd
> construction. Maybe just drop the second argument completely, as it's never
> used?
Fixed
> Otherwise already looks nice. :)
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2114
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Michael Terry (mterry) wrote : Posted in a previous version of this proposal | # |
> Agree, using the standard UbuntuNumberAni
I'm still seeing a bit of a pause at the end of the animation on my mako.
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal | # |
> > Agree, using the standard UbuntuNumberAni
> least here
>
> I'm still seeing a bit of a pause at the end of the animation on my mako.
I guess it's the reverse easing (UbuntuAnimatio
Michael Terry (mterry) wrote : Posted in a previous version of this proposal | # |
Yeah agreed, StandardEasing looks good to me. Is StandardEasingR
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal | # |
Yes, as per the attached bug report
Michael Terry (mterry) wrote : Posted in a previous version of this proposal | # |
Hrm. OK, but I ran Vesa's test code. And it didn't seem to pause at the end of the animation for me.
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:2114
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal | # |
Confirming the close animation stuttering on flo. Could not see it on my laptop.
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2115
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal | # |
Please test again, not it feels much smoother on both phone and desktop.
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2115
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal | # |
the new animation does behave better on my flo, but it's still not 100% perfect. Paying close attention one can still see the last frames sticking around longer than they should. I don't think it's a problem of this branch, rather some sync stuff happening in Unity.Application when cleaning the app out of the memory. The new animation makes it less obvious.
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:2115
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2115
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
Michael Terry (mterry) wrote : Posted in a previous version of this proposal | # |
But Michael, wouldn't the Unity.Application work only start happening once opacity is already animated down to zero?
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2117
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:2117
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:2117
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2117
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal | # |
Animation is now smooth on devices, using a small hack to pause the animation at the end before actually closing the application.
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2118
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2118
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
Michael Terry (mterry) wrote : Posted in a previous version of this proposal | # |
Looks good to me. The delay after the animation is a gross hack, but not the worst thing. I sat with Lukas and couldn't figure out why it would be needed. But it seems to be for now.
So approved from my end. Animation is smooth with the delay.
Tested it manually.
CI bot is crazy right now, let's wait for it to fix itself before top-approving.
No tags.
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2118
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2118
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Nick Dedekind (nick-dedekind) wrote : Posted in a previous version of this proposal | # |
I believe this is what is causing the window to not be visible when opening a maximised app.
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2118
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal | # |
Starting maximized apps should be fixed now
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2120
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2120
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2121
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2121
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Michael Terry (mterry) wrote : Posted in a previous version of this proposal | # |
LGTM now, maximized works.
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2122
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2122
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Daniel d'Andrada (dandrader) wrote : | # |
make tryShell
- select desktop size
- unlock screen
- select windowed mode
window gets broken
- 2123. By Nick Dedekind
-
fix disappearing windows
Lukáš Tinkl (lukas-kde) wrote : | # |
OK, fixed the behavior, just not sure where to take the default size from, I have this atm:
PropertyChanges {
target: decoratedWindow
requestedWidth: resizeArea.
requestedHeight: resizeArea.
}
Daniel d'Andrada (dandrader) wrote : | # |
Could you please re-merge your prerequisite? You seem to have an outdated version of it....
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2123
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
- 2124. By Lukáš Tinkl
-
merge prereq
Lukáš Tinkl (lukas-kde) wrote : | # |
> Could you please re-merge your prerequisite? You seem to have an outdated
> version of it....
Rebased
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2124
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2123
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 2125. By Lukáš Tinkl
-
reevaluate the screen size by making it a binding
fixes tiny windows when switching stages
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2125
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
- 2126. By Lukáš Tinkl
-
drive just the appDelegate in states and transitions
- 2127. By Lukáš Tinkl
-
restore max states
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2124
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2126
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
- 2128. By Lukáš Tinkl
-
partial revert, turn the x/y coords into a binding as well
(they depend on screenWidth/Height too)
Lukáš Tinkl (lukas-kde) wrote : | # |
Done, no more regressions spotted
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2127
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2128
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2127
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 2129. By Lukáš Tinkl
-
simplify code, fix restoring maximized windows
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2129
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2128
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2129
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 2130. By Lukáš Tinkl
-
make close() a method of the delegate
Daniel d'Andrada (dandrader) wrote : | # |
* Did you perform an exploratory manual test run of the code change and any related functionality?
Yes
* Did CI run pass? If not, please explain why.
Will never pass due to unity-api dependency from the prerequisites
* Did you make sure that the branch does not contain spurious tags?
Yes
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2130
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
- 2131. By Lukáš Tinkl
-
merge prereq, fix conflicts
- 2132. By Lukáš Tinkl
- 2133. By Lukáš Tinkl
-
merge prereq
- 2134. By Lukáš Tinkl
-
merge trunk
- 2135. By Lukáš Tinkl
-
handle the close case coming from launcher
- 2136. By Lukáš Tinkl
-
fix the launcher ApplicationManager mock
- 2137. By Lukáš Tinkl
-
restart app if focusing doesn't work
happens with dash sometimes
- 2138. By Lukáš Tinkl
-
make the close animation testable using the App checkbox
- 2139. By Lukáš Tinkl
-
fix fullscreen apps being offset by the left margin
- 2140. By Lukáš Tinkl
-
disallow resizing windows up past the Panel
- 2141. By Lukáš Tinkl
-
fix closing animation for minimized apps
- 2142. By Lukáš Tinkl
-
fullscreen apps fix
- 2143. By Lukáš Tinkl
-
fix for fullscreen windows height
- 2144. By Lukáš Tinkl
- 2145. By Lukáš Tinkl
-
revert keymap (unrelated) changes
- 2146. By Lukáš Tinkl
-
depend on -15 appl framework
- 2147. By Lukáš Tinkl
-
implement maximizeHorizon
tally/Verticall y - 2148. By Lukáš Tinkl
-
requestStop() here
- 2149. By Lukáš Tinkl
-
save/restore the correct state in all cases
implement (easy now) maximize horizontal/vertical using it
- 2150. By Lukáš Tinkl
-
merge trunk
- 2151. By Lukáš Tinkl
-
merge trunk
- 2152. By Lukáš Tinkl
-
merge trunk
- 2153. By Lukáš Tinkl
-
merge trunk, resolve conflicts
- 2154. By Lukáš Tinkl
-
merge trunk
- 2155. By Lukáš Tinkl
-
merge trunk
Unmerged revisions
- 2155. By Lukáš Tinkl
-
merge trunk
- 2154. By Lukáš Tinkl
-
merge trunk
- 2153. By Lukáš Tinkl
-
merge trunk, resolve conflicts
- 2152. By Lukáš Tinkl
-
merge trunk
- 2151. By Lukáš Tinkl
-
merge trunk
- 2150. By Lukáš Tinkl
-
merge trunk
- 2149. By Lukáš Tinkl
-
save/restore the correct state in all cases
implement (easy now) maximize horizontal/vertical using it
- 2148. By Lukáš Tinkl
-
requestStop() here
- 2147. By Lukáš Tinkl
-
implement maximizeHorizon
tally/Verticall y - 2146. By Lukáš Tinkl
-
depend on -15 appl framework
Preview Diff
1 | === modified file 'plugins/Unity/Indicators/indicatorsmanager.cpp' | |||
2 | --- plugins/Unity/Indicators/indicatorsmanager.cpp 2015-12-02 12:02:50 +0000 | |||
3 | +++ plugins/Unity/Indicators/indicatorsmanager.cpp 2016-02-17 21:52:10 +0000 | |||
4 | @@ -116,10 +116,6 @@ | |||
5 | 116 | QSettings indicator_settings(file_info.absoluteFilePath(), QSettings::IniFormat, this); | 116 | QSettings indicator_settings(file_info.absoluteFilePath(), QSettings::IniFormat, this); |
6 | 117 | const QString name = indicator_settings.value(QStringLiteral("Indicator Service/Name")).toString(); | 117 | const QString name = indicator_settings.value(QStringLiteral("Indicator Service/Name")).toString(); |
7 | 118 | 118 | ||
8 | 119 | if (m_platform.isPC() && name == "indicator-keyboard") { | ||
9 | 120 | return; // convergence: skip this indicator until it works in Mir | ||
10 | 121 | } | ||
11 | 122 | |||
12 | 123 | auto iter = m_indicatorsData.constFind(name); | 119 | auto iter = m_indicatorsData.constFind(name); |
13 | 124 | if (iter != m_indicatorsData.constEnd()) | 120 | if (iter != m_indicatorsData.constEnd()) |
14 | 125 | { | 121 | { |
15 | @@ -289,10 +285,12 @@ | |||
16 | 289 | // 1) enable session indicator conditionally, typically when running in a multisession/multiuser environment | 285 | // 1) enable session indicator conditionally, typically when running in a multisession/multiuser environment |
17 | 290 | // 2) on a PC, switch the battery/power indicator to desktop mode, | 286 | // 2) on a PC, switch the battery/power indicator to desktop mode, |
18 | 291 | // can't control brightness for now and phone-on-desktop broken (FIXME) | 287 | // can't control brightness for now and phone-on-desktop broken (FIXME) |
19 | 288 | // 3) enable the keyboard switcher on u8 (it has no phone profile yet, FIXME) | ||
20 | 292 | // | 289 | // |
21 | 293 | // The rest of the indicators respect their default profile (which is "phone", even on desktop PCs) | 290 | // The rest of the indicators respect their default profile (which is "phone", even on desktop PCs) |
22 | 294 | if ((new_indicator->identifier() == QStringLiteral("indicator-session") && m_platform.isMultiSession()) | 291 | if ((new_indicator->identifier() == QStringLiteral("indicator-session") && m_platform.isMultiSession()) |
24 | 295 | || (new_indicator->identifier() == QStringLiteral("indicator-power") && m_platform.isPC())) { | 292 | || (new_indicator->identifier() == QStringLiteral("indicator-power") && m_platform.isPC()) |
25 | 293 | || (new_indicator->identifier() == QStringLiteral("indicator-keyboard"))) { | ||
26 | 296 | new_indicator->setProfile("desktop"); | 294 | new_indicator->setProfile("desktop"); |
27 | 297 | } else { | 295 | } else { |
28 | 298 | new_indicator->setProfile(m_profile); | 296 | new_indicator->setProfile(m_profile); |
29 | 299 | 297 | ||
30 | === modified file 'qml/Panel/Indicators/MenuItemFactory.qml' | |||
31 | --- qml/Panel/Indicators/MenuItemFactory.qml 2016-01-11 17:36:56 +0000 | |||
32 | +++ qml/Panel/Indicators/MenuItemFactory.qml 2016-02-17 21:52:10 +0000 | |||
33 | @@ -300,6 +300,49 @@ | |||
34 | 300 | } | 300 | } |
35 | 301 | 301 | ||
36 | 302 | Component { | 302 | Component { |
37 | 303 | id: keymapMenu; | ||
38 | 304 | |||
39 | 305 | Menus.CheckableMenu { | ||
40 | 306 | id: keymapItem | ||
41 | 307 | objectName: "keymapMenu" | ||
42 | 308 | property QtObject menuData: null | ||
43 | 309 | property int menuIndex: -1 | ||
44 | 310 | property bool serverChecked: menuData && menuData.isToggled || false | ||
45 | 311 | |||
46 | 312 | text: menuData && menuData.label || "" | ||
47 | 313 | enabled: menuData && menuData.sensitive && !serverChecked || false | ||
48 | 314 | checked: serverChecked | ||
49 | 315 | highlightWhenPressed: false | ||
50 | 316 | |||
51 | 317 | ServerPropertySynchroniser { | ||
52 | 318 | objectName: "sync" | ||
53 | 319 | syncTimeout: Utils.Constants.indicatorValueTimeout | ||
54 | 320 | |||
55 | 321 | serverTarget: keymapItem | ||
56 | 322 | serverProperty: "serverChecked" | ||
57 | 323 | userTarget: keymapItem | ||
58 | 324 | userProperty: "checked" | ||
59 | 325 | |||
60 | 326 | onSyncTriggered: { | ||
61 | 327 | var keymapIndex = keymapItem.menuIndex; | ||
62 | 328 | keymapActionGroup.currentAction.updateState(keymapIndex); | ||
63 | 329 | } | ||
64 | 330 | } | ||
65 | 331 | |||
66 | 332 | QDBusActionGroup { | ||
67 | 333 | id: keymapActionGroup | ||
68 | 334 | busType: DBus.SessionBus | ||
69 | 335 | busName: "com.canonical.indicator.keyboard" | ||
70 | 336 | objectPath: "/com/canonical/indicator/keyboard" | ||
71 | 337 | |||
72 | 338 | property variant currentAction: action("current") | ||
73 | 339 | |||
74 | 340 | Component.onCompleted: keymapActionGroup.start() | ||
75 | 341 | } | ||
76 | 342 | } | ||
77 | 343 | } | ||
78 | 344 | |||
79 | 345 | Component { | ||
80 | 303 | id: checkableMenu; | 346 | id: checkableMenu; |
81 | 304 | 347 | ||
82 | 305 | Menus.CheckableMenu { | 348 | Menus.CheckableMenu { |
83 | @@ -994,6 +1037,9 @@ | |||
84 | 994 | console.debug("Don't know how to make " + modelData.type + " for " + context); | 1037 | console.debug("Don't know how to make " + modelData.type + " for " + context); |
85 | 995 | } | 1038 | } |
86 | 996 | if (modelData.isCheck || modelData.isRadio) { | 1039 | if (modelData.isCheck || modelData.isRadio) { |
87 | 1040 | if (context === "indicator-keyboard" ) { | ||
88 | 1041 | return keymapMenu; | ||
89 | 1042 | } | ||
90 | 997 | return checkableMenu; | 1043 | return checkableMenu; |
91 | 998 | } | 1044 | } |
92 | 999 | if (modelData.isSeparator) { | 1045 | if (modelData.isSeparator) { |
93 | 1000 | 1046 | ||
94 | === modified file 'qml/Stages/ApplicationWindow.qml' | |||
95 | --- qml/Stages/ApplicationWindow.qml 2016-02-17 21:52:09 +0000 | |||
96 | +++ qml/Stages/ApplicationWindow.qml 2016-02-17 21:52:10 +0000 | |||
97 | @@ -29,6 +29,7 @@ | |||
98 | 29 | property bool orientationChangesEnabled: d.supportsSurfaceResize ? d.surfaceOldEnoughToBeResized : true | 29 | property bool orientationChangesEnabled: d.supportsSurfaceResize ? d.surfaceOldEnoughToBeResized : true |
99 | 30 | readonly property string title: sessionContainer.surface && sessionContainer.surface.name !== "" ? | 30 | readonly property string title: sessionContainer.surface && sessionContainer.surface.name !== "" ? |
100 | 31 | sessionContainer.surface.name : d.name | 31 | sessionContainer.surface.name : d.name |
101 | 32 | readonly property string currentKeymap: sessionContainer.surfaceContainer ? sessionContainer.surfaceContainer.currentKeymap : "us" | ||
102 | 32 | 33 | ||
103 | 33 | // to be set from outside | 34 | // to be set from outside |
104 | 34 | property QtObject application | 35 | property QtObject application |
105 | @@ -37,6 +38,10 @@ | |||
106 | 37 | property int requestedWidth: -1 | 38 | property int requestedWidth: -1 |
107 | 38 | property int requestedHeight: -1 | 39 | property int requestedHeight: -1 |
108 | 39 | 40 | ||
109 | 41 | function switchToKeymap(index) { | ||
110 | 42 | sessionContainer.surfaceContainer.switchToKeymap(index); | ||
111 | 43 | } | ||
112 | 44 | |||
113 | 40 | readonly property int minimumWidth: sessionContainer.surface ? sessionContainer.surface.minimumWidth : 0 | 45 | readonly property int minimumWidth: sessionContainer.surface ? sessionContainer.surface.minimumWidth : 0 |
114 | 41 | readonly property int minimumHeight: sessionContainer.surface ? sessionContainer.surface.minimumHeight : 0 | 46 | readonly property int minimumHeight: sessionContainer.surface ? sessionContainer.surface.minimumHeight : 0 |
115 | 42 | readonly property int maximumWidth: sessionContainer.surface ? sessionContainer.surface.maximumWidth : 0 | 47 | readonly property int maximumWidth: sessionContainer.surface ? sessionContainer.surface.maximumWidth : 0 |
116 | @@ -44,14 +49,6 @@ | |||
117 | 44 | readonly property int widthIncrement: sessionContainer.surface ? sessionContainer.surface.widthIncrement : 0 | 49 | readonly property int widthIncrement: sessionContainer.surface ? sessionContainer.surface.widthIncrement : 0 |
118 | 45 | readonly property int heightIncrement: sessionContainer.surface ? sessionContainer.surface.heightIncrement : 0 | 50 | readonly property int heightIncrement: sessionContainer.surface ? sessionContainer.surface.heightIncrement : 0 |
119 | 46 | 51 | ||
120 | 47 | function nextKeymap() { | ||
121 | 48 | sessionContainer.surfaceContainer.nextKeymap(); | ||
122 | 49 | } | ||
123 | 50 | |||
124 | 51 | function previousKeymap() { | ||
125 | 52 | sessionContainer.surfaceContainer.previousKeymap(); | ||
126 | 53 | } | ||
127 | 54 | |||
128 | 55 | QtObject { | 52 | QtObject { |
129 | 56 | id: d | 53 | id: d |
130 | 57 | 54 | ||
131 | 58 | 55 | ||
132 | === modified file 'qml/Stages/DecoratedWindow.qml' | |||
133 | --- qml/Stages/DecoratedWindow.qml 2016-02-17 21:52:09 +0000 | |||
134 | +++ qml/Stages/DecoratedWindow.qml 2016-02-17 21:52:10 +0000 | |||
135 | @@ -31,6 +31,7 @@ | |||
136 | 31 | property alias active: decoration.active | 31 | property alias active: decoration.active |
137 | 32 | property alias title: decoration.title | 32 | property alias title: decoration.title |
138 | 33 | property alias fullscreen: applicationWindow.fullscreen | 33 | property alias fullscreen: applicationWindow.fullscreen |
139 | 34 | readonly property alias currentKeymap: applicationWindow.currentKeymap | ||
140 | 34 | 35 | ||
141 | 35 | readonly property bool decorationShown: !fullscreen | 36 | readonly property bool decorationShown: !fullscreen |
142 | 36 | property bool highlightShown: false | 37 | property bool highlightShown: false |
143 | @@ -51,12 +52,8 @@ | |||
144 | 51 | signal minimize() | 52 | signal minimize() |
145 | 52 | signal decorationPressed() | 53 | signal decorationPressed() |
146 | 53 | 54 | ||
153 | 54 | function nextKeymap() { | 55 | function switchToKeymap(index) { |
154 | 55 | applicationWindow.nextKeymap(); | 56 | applicationWindow.switchToKeymap(index); |
149 | 56 | } | ||
150 | 57 | |||
151 | 58 | function previousKeymap() { | ||
152 | 59 | applicationWindow.previousKeymap(); | ||
155 | 60 | } | 57 | } |
156 | 61 | 58 | ||
157 | 62 | Rectangle { | 59 | Rectangle { |
158 | 63 | 60 | ||
159 | === modified file 'qml/Stages/DesktopStage.qml' | |||
160 | --- qml/Stages/DesktopStage.qml 2016-02-17 21:52:09 +0000 | |||
161 | +++ qml/Stages/DesktopStage.qml 2016-02-17 21:52:10 +0000 | |||
162 | @@ -22,6 +22,7 @@ | |||
163 | 22 | import Utils 0.1 | 22 | import Utils 0.1 |
164 | 23 | import Ubuntu.Gestures 0.1 | 23 | import Ubuntu.Gestures 0.1 |
165 | 24 | import GlobalShortcut 1.0 | 24 | import GlobalShortcut 1.0 |
166 | 25 | import QMenuModel 0.1 as QMenuModel | ||
167 | 25 | import AccountsService 0.1 | 26 | import AccountsService 0.1 |
168 | 26 | 27 | ||
169 | 27 | AbstractStage { | 28 | AbstractStage { |
170 | @@ -61,9 +62,8 @@ | |||
171 | 61 | } | 62 | } |
172 | 62 | 63 | ||
173 | 63 | onFocusRequested: { | 64 | onFocusRequested: { |
177 | 64 | var appIndex = priv.indexOf(appId); | 65 | var delegate = priv.appDelegate(appId); |
178 | 65 | var appDelegate = appRepeater.itemAt(appIndex); | 66 | delegate.restore(); |
176 | 66 | appDelegate.restore(); | ||
179 | 67 | 67 | ||
180 | 68 | if (spread.state == "altTab") { | 68 | if (spread.state == "altTab") { |
181 | 69 | spread.cancel(); | 69 | spread.cancel(); |
182 | @@ -74,7 +74,7 @@ | |||
183 | 74 | GlobalShortcut { | 74 | GlobalShortcut { |
184 | 75 | id: closeWindowShortcut | 75 | id: closeWindowShortcut |
185 | 76 | shortcut: Qt.AltModifier|Qt.Key_F4 | 76 | shortcut: Qt.AltModifier|Qt.Key_F4 |
187 | 77 | onTriggered: ApplicationManager.stopApplication(priv.focusedAppId) | 77 | onTriggered: priv.focusedAppDelegate.close() |
188 | 78 | active: priv.focusedAppId !== "" | 78 | active: priv.focusedAppId !== "" |
189 | 79 | } | 79 | } |
190 | 80 | 80 | ||
191 | @@ -121,14 +121,12 @@ | |||
192 | 121 | 121 | ||
193 | 122 | GlobalShortcut { | 122 | GlobalShortcut { |
194 | 123 | shortcut: Qt.MetaModifier|Qt.Key_Space | 123 | shortcut: Qt.MetaModifier|Qt.Key_Space |
197 | 124 | onTriggered: priv.focusedAppDelegate.nextKeymap() | 124 | onTriggered: priv.nextKeymap() |
196 | 125 | active: priv.focusedAppDelegate !== null | ||
198 | 126 | } | 125 | } |
199 | 127 | 126 | ||
200 | 128 | GlobalShortcut { | 127 | GlobalShortcut { |
201 | 129 | shortcut: Qt.MetaModifier|Qt.ShiftModifier|Qt.Key_Space | 128 | shortcut: Qt.MetaModifier|Qt.ShiftModifier|Qt.Key_Space |
204 | 130 | onTriggered: priv.focusedAppDelegate.previousKeymap() | 129 | onTriggered: priv.previousKeymap() |
203 | 131 | active: priv.focusedAppDelegate !== null | ||
205 | 132 | } | 130 | } |
206 | 133 | 131 | ||
207 | 134 | QtObject { | 132 | QtObject { |
208 | @@ -188,13 +186,72 @@ | |||
209 | 188 | } | 186 | } |
210 | 189 | } | 187 | } |
211 | 190 | } | 188 | } |
212 | 189 | |||
213 | 190 | function appDelegate(appId) { | ||
214 | 191 | var appIndex = indexOf(appId); | ||
215 | 192 | return appRepeater.itemAt(appIndex); | ||
216 | 193 | } | ||
217 | 194 | |||
218 | 195 | // keymap | ||
219 | 196 | readonly property bool globalKeymapSwitching: true // TODO make this configurable in the future | ||
220 | 197 | readonly property string activeKeymap: priv.focusedAppDelegate ? priv.focusedAppDelegate.currentKeymap : "us" | ||
221 | 198 | onActiveKeymapChanged: { | ||
222 | 199 | var activeIndex = AccountsService.keymaps.indexOf(activeKeymap); | ||
223 | 200 | if (activeIndex !== -1) { | ||
224 | 201 | keymapActionGroup.activeAction.updateState(activeIndex); // tell the keyboard indicator about the active keymap | ||
225 | 202 | } | ||
226 | 203 | } | ||
227 | 204 | |||
228 | 205 | // TODO Work around http://pad.lv/1293478 until qmenumodel knows to cast | ||
229 | 206 | readonly property int stepUp: -1 | ||
230 | 207 | readonly property int stepDown: 1 | ||
231 | 208 | |||
232 | 209 | function nextKeymap() { | ||
233 | 210 | keymapActionGroup.nextAction.activate(stepUp); | ||
234 | 211 | } | ||
235 | 212 | |||
236 | 213 | function previousKeymap() { | ||
237 | 214 | keymapActionGroup.nextAction.activate(stepDown); | ||
238 | 215 | } | ||
239 | 216 | |||
240 | 217 | function switchKeymaps(index) { // switch all surfaces to keymap with index | ||
241 | 218 | for (var i = 0; i < appRepeater.count; i++) { | ||
242 | 219 | var appDelegate = appRepeater.itemAt(i); | ||
243 | 220 | if (appDelegate) { | ||
244 | 221 | appDelegate.switchToKeymap(index); | ||
245 | 222 | } | ||
246 | 223 | } | ||
247 | 224 | } | ||
248 | 225 | } | ||
249 | 226 | |||
250 | 227 | QMenuModel.QDBusActionGroup { | ||
251 | 228 | id: keymapActionGroup | ||
252 | 229 | busType: QMenuModel.DBus.SessionBus | ||
253 | 230 | busName: "com.canonical.indicator.keyboard" | ||
254 | 231 | objectPath: "/com/canonical/indicator/keyboard" | ||
255 | 232 | |||
256 | 233 | property variant activeAction: action("active") | ||
257 | 234 | property variant nextAction: action("scroll") | ||
258 | 235 | |||
259 | 236 | readonly property int currentLayoutIndex: action("current") ? action("current").state : 0 | ||
260 | 237 | onCurrentLayoutIndexChanged: { | ||
261 | 238 | if (priv.globalKeymapSwitching) { | ||
262 | 239 | priv.switchKeymaps(currentLayoutIndex); | ||
263 | 240 | } else if (priv.focusedAppDelegate) { | ||
264 | 241 | priv.focusedAppDelegate.switchToKeymap(currentLayoutIndex); | ||
265 | 242 | } | ||
266 | 243 | } | ||
267 | 244 | |||
268 | 245 | Component.onCompleted: { | ||
269 | 246 | keymapActionGroup.start(); | ||
270 | 247 | } | ||
271 | 191 | } | 248 | } |
272 | 192 | 249 | ||
273 | 193 | Connections { | 250 | Connections { |
274 | 194 | target: PanelState | 251 | target: PanelState |
278 | 195 | onClose: { | 252 | onClose: if (priv.focusedAppDelegate) { |
279 | 196 | ApplicationManager.stopApplication(ApplicationManager.focusedApplicationId) | 253 | priv.focusedAppDelegate.close() |
280 | 197 | } | 254 | } |
281 | 198 | onMinimize: priv.focusedAppDelegate && priv.focusedAppDelegate.minimize(); | 255 | onMinimize: priv.focusedAppDelegate && priv.focusedAppDelegate.minimize(); |
282 | 199 | onMaximize: priv.focusedAppDelegate // don't restore minimized apps when double clicking the panel | 256 | onMaximize: priv.focusedAppDelegate // don't restore minimized apps when double clicking the panel |
283 | 200 | && priv.focusedAppDelegate.restoreFromMaximized(); | 257 | && priv.focusedAppDelegate.restoreFromMaximized(); |
284 | @@ -237,7 +294,6 @@ | |||
285 | 237 | PanelState.dropShadow = false; | 294 | PanelState.dropShadow = false; |
286 | 238 | } | 295 | } |
287 | 239 | 296 | ||
288 | 240 | |||
289 | 241 | FocusScope { | 297 | FocusScope { |
290 | 242 | id: appContainer | 298 | id: appContainer |
291 | 243 | objectName: "appContainer" | 299 | objectName: "appContainer" |
292 | @@ -295,6 +351,7 @@ | |||
293 | 295 | readonly property string appName: model.name | 351 | readonly property string appName: model.name |
294 | 296 | property bool visuallyMaximized: false | 352 | property bool visuallyMaximized: false |
295 | 297 | property bool visuallyMinimized: false | 353 | property bool visuallyMinimized: false |
296 | 354 | readonly property alias currentKeymap: decoratedWindow.currentKeymap | ||
297 | 298 | 355 | ||
298 | 299 | onFocusChanged: { | 356 | onFocusChanged: { |
299 | 300 | if (focus && ApplicationManager.focusedApplicationId !== appId) { | 357 | if (focus && ApplicationManager.focusedApplicationId !== appId) { |
300 | @@ -363,12 +420,12 @@ | |||
301 | 363 | ApplicationManager.focusApplication(appId); | 420 | ApplicationManager.focusApplication(appId); |
302 | 364 | } | 421 | } |
303 | 365 | 422 | ||
306 | 366 | function nextKeymap() { | 423 | function switchToKeymap(index) { |
307 | 367 | decoratedWindow.nextKeymap(); | 424 | decoratedWindow.switchToKeymap(index); |
308 | 368 | } | 425 | } |
309 | 369 | 426 | ||
312 | 370 | function previousKeymap() { | 427 | function close() { |
313 | 371 | decoratedWindow.previousKeymap(); | 428 | state = "closing"; |
314 | 372 | } | 429 | } |
315 | 373 | 430 | ||
316 | 374 | function playFocusAnimation() { | 431 | function playFocusAnimation() { |
317 | @@ -386,6 +443,14 @@ | |||
318 | 386 | 443 | ||
319 | 387 | states: [ | 444 | states: [ |
320 | 388 | State { | 445 | State { |
321 | 446 | name: "closing" | ||
322 | 447 | PropertyChanges { // freeze the values | ||
323 | 448 | target: appDelegate; explicit: true; restoreEntryValues: false; | ||
324 | 449 | x: appDelegate.x; y: appDelegate.y | ||
325 | 450 | requestedWidth: appDelegate.width; requestedHeight: appDelegate.height | ||
326 | 451 | } | ||
327 | 452 | }, | ||
328 | 453 | State { | ||
329 | 389 | name: "fullscreen"; when: decoratedWindow.fullscreen | 454 | name: "fullscreen"; when: decoratedWindow.fullscreen |
330 | 390 | PropertyChanges { | 455 | PropertyChanges { |
331 | 391 | target: appDelegate; | 456 | target: appDelegate; |
332 | @@ -400,7 +465,8 @@ | |||
333 | 400 | PropertyChanges { | 465 | PropertyChanges { |
334 | 401 | target: appDelegate; | 466 | target: appDelegate; |
335 | 402 | visuallyMinimized: false; | 467 | visuallyMinimized: false; |
337 | 403 | visuallyMaximized: false | 468 | visuallyMaximized: false; |
338 | 469 | opacity: 1; scale: 1 | ||
339 | 404 | } | 470 | } |
340 | 405 | }, | 471 | }, |
341 | 406 | State { | 472 | State { |
342 | @@ -410,7 +476,8 @@ | |||
343 | 410 | x: root.leftMargin; y: 0; | 476 | x: root.leftMargin; y: 0; |
344 | 411 | requestedWidth: appContainer.width - root.leftMargin; requestedHeight: appContainer.height; | 477 | requestedWidth: appContainer.width - root.leftMargin; requestedHeight: appContainer.height; |
345 | 412 | visuallyMinimized: false; | 478 | visuallyMinimized: false; |
347 | 413 | visuallyMaximized: true | 479 | visuallyMaximized: true; |
348 | 480 | opacity: 1; scale: 1 | ||
349 | 414 | } | 481 | } |
350 | 415 | }, | 482 | }, |
351 | 416 | State { | 483 | State { |
352 | @@ -437,17 +504,32 @@ | |||
353 | 437 | ] | 504 | ] |
354 | 438 | transitions: [ | 505 | transitions: [ |
355 | 439 | Transition { | 506 | Transition { |
356 | 507 | from: ",minimized" | ||
357 | 440 | to: "normal" | 508 | to: "normal" |
358 | 441 | enabled: appDelegate.animationsEnabled | 509 | enabled: appDelegate.animationsEnabled |
359 | 442 | PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" } | 510 | PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" } |
361 | 443 | UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: UbuntuAnimation.FastDuration } | 511 | UbuntuNumberAnimation { target: appDelegate; properties: "x,y" } |
362 | 512 | UbuntuNumberAnimation { | ||
363 | 513 | target: appDelegate | ||
364 | 514 | property: 'scale' | ||
365 | 515 | from: 0.85 | ||
366 | 516 | to: 1 | ||
367 | 517 | duration: UbuntuAnimation.SnapDuration | ||
368 | 518 | } | ||
369 | 519 | UbuntuNumberAnimation { | ||
370 | 520 | target: appDelegate | ||
371 | 521 | property: 'opacity' | ||
372 | 522 | from: 0 | ||
373 | 523 | to: 1 | ||
374 | 524 | duration: UbuntuAnimation.SnapDuration | ||
375 | 525 | } | ||
376 | 444 | }, | 526 | }, |
377 | 445 | Transition { | 527 | Transition { |
378 | 446 | to: "minimized" | 528 | to: "minimized" |
379 | 447 | enabled: appDelegate.animationsEnabled | 529 | enabled: appDelegate.animationsEnabled |
380 | 448 | PropertyAction { target: appDelegate; property: "visuallyMaximized" } | 530 | PropertyAction { target: appDelegate; property: "visuallyMaximized" } |
381 | 449 | SequentialAnimation { | 531 | SequentialAnimation { |
383 | 450 | UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: UbuntuAnimation.FastDuration } | 532 | UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,scale,requestedWidth,requestedHeight" } |
384 | 451 | PropertyAction { target: appDelegate; property: "visuallyMinimized" } | 533 | PropertyAction { target: appDelegate; property: "visuallyMinimized" } |
385 | 452 | ScriptAction { | 534 | ScriptAction { |
386 | 453 | script: { | 535 | script: { |
387 | @@ -459,11 +541,42 @@ | |||
388 | 459 | } | 541 | } |
389 | 460 | }, | 542 | }, |
390 | 461 | Transition { | 543 | Transition { |
391 | 544 | to: "closing" | ||
392 | 545 | SequentialAnimation { | ||
393 | 546 | PropertyAction { target: appDelegate; properties: "x,y,requestedWidth,requestedHeight" } | ||
394 | 547 | ParallelAnimation { | ||
395 | 548 | UbuntuNumberAnimation { | ||
396 | 549 | target: appDelegate | ||
397 | 550 | property: 'scale' | ||
398 | 551 | from: 1 | ||
399 | 552 | to: 0.85 | ||
400 | 553 | duration: UbuntuAnimation.SnapDuration | ||
401 | 554 | easing: UbuntuAnimation.StandardEasingReverse | ||
402 | 555 | } | ||
403 | 556 | UbuntuNumberAnimation { | ||
404 | 557 | target: appDelegate | ||
405 | 558 | property: 'opacity' | ||
406 | 559 | from: 1 | ||
407 | 560 | to: 0 | ||
408 | 561 | duration: UbuntuAnimation.SnapDuration | ||
409 | 562 | easing: UbuntuAnimation.StandardEasingReverse | ||
410 | 563 | } | ||
411 | 564 | } | ||
412 | 565 | // hack: make sure the animation has really finished before closing the app | ||
413 | 566 | PauseAnimation { duration: UbuntuAnimation.SnapDuration } | ||
414 | 567 | ScriptAction { | ||
415 | 568 | script: { | ||
416 | 569 | ApplicationManager.stopApplication(appId); | ||
417 | 570 | } | ||
418 | 571 | } | ||
419 | 572 | } | ||
420 | 573 | }, | ||
421 | 574 | Transition { | ||
422 | 462 | to: "*" //maximized and fullscreen | 575 | to: "*" //maximized and fullscreen |
423 | 463 | enabled: appDelegate.animationsEnabled | 576 | enabled: appDelegate.animationsEnabled |
424 | 464 | PropertyAction { target: appDelegate; property: "visuallyMinimized" } | 577 | PropertyAction { target: appDelegate; property: "visuallyMinimized" } |
425 | 465 | SequentialAnimation { | 578 | SequentialAnimation { |
427 | 466 | UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: UbuntuAnimation.FastDuration } | 579 | UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,scale,requestedWidth,requestedHeight" } |
428 | 467 | PropertyAction { target: appDelegate; property: "visuallyMaximized" } | 580 | PropertyAction { target: appDelegate; property: "visuallyMaximized" } |
429 | 468 | } | 581 | } |
430 | 469 | } | 582 | } |
431 | @@ -500,7 +613,7 @@ | |||
432 | 500 | active: ApplicationManager.focusedApplicationId === model.appId | 613 | active: ApplicationManager.focusedApplicationId === model.appId |
433 | 501 | focus: true | 614 | focus: true |
434 | 502 | 615 | ||
436 | 503 | onClose: ApplicationManager.stopApplication(model.appId) | 616 | onClose: appDelegate.close() |
437 | 504 | onMaximize: appDelegate.maximized || appDelegate.maximizedLeft || appDelegate.maximizedRight | 617 | onMaximize: appDelegate.maximized || appDelegate.maximizedLeft || appDelegate.maximizedRight |
438 | 505 | ? appDelegate.restoreFromMaximized() : appDelegate.maximize() | 618 | ? appDelegate.restoreFromMaximized() : appDelegate.maximize() |
439 | 506 | onMinimize: appDelegate.minimize() | 619 | onMinimize: appDelegate.minimize() |
440 | 507 | 620 | ||
441 | === modified file 'qml/Stages/SurfaceContainer.qml' | |||
442 | --- qml/Stages/SurfaceContainer.qml 2016-02-17 21:52:09 +0000 | |||
443 | +++ qml/Stages/SurfaceContainer.qml 2016-02-17 21:52:10 +0000 | |||
444 | @@ -48,32 +48,13 @@ | |||
445 | 48 | } | 48 | } |
446 | 49 | } | 49 | } |
447 | 50 | 50 | ||
474 | 51 | function nextKeymap() { | 51 | function switchToKeymap(index) { |
475 | 52 | var currentIndex = keymaps.indexOf(currentKeymap); | 52 | currentKeymap = keymaps[index]; |
476 | 53 | var nextIndex = 0; | 53 | var keymap = currentKeymap.split("+"); |
477 | 54 | 54 | ||
478 | 55 | if (currentIndex !== -1 && currentIndex < keymaps.length - 1) { | 55 | if (surface) { |
479 | 56 | nextIndex = currentIndex + 1; | 56 | surface.setKeymap(keymap[0], keymap[1] || ""); |
480 | 57 | } | 57 | } |
455 | 58 | |||
456 | 59 | currentKeymap = keymaps[nextIndex]; | ||
457 | 60 | var keymap = currentKeymap.split("+"); | ||
458 | 61 | |||
459 | 62 | surface.setKeymap(keymap[0], keymap[1] || ""); | ||
460 | 63 | } | ||
461 | 64 | |||
462 | 65 | function previousKeymap() { | ||
463 | 66 | var currentIndex = keymaps.indexOf(currentKeymap); | ||
464 | 67 | var prevIndex = keymaps.length - 1; | ||
465 | 68 | |||
466 | 69 | if (currentIndex > 0) { | ||
467 | 70 | prevIndex = currentIndex - 1; | ||
468 | 71 | } | ||
469 | 72 | |||
470 | 73 | currentKeymap = keymaps[prevIndex]; | ||
471 | 74 | var keymap = currentKeymap.split("+"); | ||
472 | 75 | |||
473 | 76 | surface.setKeymap(keymap[0], keymap[1] || ""); | ||
481 | 77 | } | 58 | } |
482 | 78 | 59 | ||
483 | 79 | InputWatcher { | 60 | InputWatcher { |
484 | 80 | 61 | ||
485 | === modified file 'qml/Stages/WindowResizeArea.qml' | |||
486 | --- qml/Stages/WindowResizeArea.qml 2016-02-17 21:52:09 +0000 | |||
487 | +++ qml/Stages/WindowResizeArea.qml 2016-02-17 21:52:10 +0000 | |||
488 | @@ -73,10 +73,10 @@ | |||
489 | 73 | var windowGeometry = windowStateStorage.getGeometry(root.windowId, | 73 | var windowGeometry = windowStateStorage.getGeometry(root.windowId, |
490 | 74 | Qt.rect(target.x, target.y, defaultWidth, defaultHeight)); | 74 | Qt.rect(target.x, target.y, defaultWidth, defaultHeight)); |
491 | 75 | 75 | ||
496 | 76 | target.requestedWidth = Math.min(Math.max(windowGeometry.width, d.minimumWidth), screenWidth - root.leftMargin); | 76 | target.requestedWidth = Qt.binding(function() { return Math.min(Math.max(windowGeometry.width, d.minimumWidth), screenWidth - root.leftMargin); }); |
497 | 77 | target.requestedHeight = Math.min(Math.max(windowGeometry.height, d.minimumHeight), root.screenHeight - PanelState.panelHeight); | 77 | target.requestedHeight = Qt.binding(function() { return Math.min(Math.max(windowGeometry.height, d.minimumHeight), root.screenHeight - PanelState.panelHeight); }); |
498 | 78 | target.x = Math.max(Math.min(windowGeometry.x, root.screenWidth - root.leftMargin - target.requestedWidth), root.leftMargin) | 78 | target.x = Qt.binding(function() { return Math.max(Math.min(windowGeometry.x, root.screenWidth - root.leftMargin - target.requestedWidth), root.leftMargin); }); |
499 | 79 | target.y = Math.max(Math.min(windowGeometry.y, root.screenHeight - target.requestedHeight), PanelState.panelHeight) | 79 | target.y = Qt.binding(function() { return Math.max(Math.min(windowGeometry.y, root.screenHeight - target.requestedHeight), PanelState.panelHeight); }); |
500 | 80 | 80 | ||
501 | 81 | var windowState = windowStateStorage.getState(root.windowId, WindowStateStorage.WindowStateNormal) | 81 | var windowState = windowStateStorage.getState(root.windowId, WindowStateStorage.WindowStateNormal) |
502 | 82 | if (windowState === WindowStateStorage.WindowStateMaximized) { | 82 | if (windowState === WindowStateStorage.WindowStateMaximized) { |
503 | @@ -86,7 +86,7 @@ | |||
504 | 86 | } | 86 | } |
505 | 87 | 87 | ||
506 | 88 | Component.onDestruction: { | 88 | Component.onDestruction: { |
508 | 89 | windowStateStorage.saveState(root.windowId, target.state == "maximized" ? WindowStateStorage.WindowStateMaximized : WindowStateStorage.WindowStateNormal) | 89 | windowStateStorage.saveState(root.windowId, target.maximized ? WindowStateStorage.WindowStateMaximized : WindowStateStorage.WindowStateNormal) |
509 | 90 | windowStateStorage.saveGeometry(root.windowId, Qt.rect(priv.normalX, priv.normalY, priv.normalWidth, priv.normalHeight)) | 90 | windowStateStorage.saveGeometry(root.windowId, Qt.rect(priv.normalX, priv.normalY, priv.normalWidth, priv.normalHeight)) |
510 | 91 | } | 91 | } |
511 | 92 | 92 | ||
512 | 93 | 93 | ||
513 | === modified file 'tests/qmltests/Stages/tst_DesktopStage.qml' | |||
514 | --- tests/qmltests/Stages/tst_DesktopStage.qml 2016-02-17 21:52:09 +0000 | |||
515 | +++ tests/qmltests/Stages/tst_DesktopStage.qml 2016-02-17 21:52:10 +0000 | |||
516 | @@ -362,7 +362,7 @@ | |||
517 | 362 | verify(appDelegate); | 362 | verify(appDelegate); |
518 | 363 | ApplicationManager.focusApplication(appName); | 363 | ApplicationManager.focusApplication(appName); |
519 | 364 | keyClick(Qt.Key_F4, Qt.AltModifier); // Alt+F4 shortcut to close | 364 | keyClick(Qt.Key_F4, Qt.AltModifier); // Alt+F4 shortcut to close |
521 | 365 | verify(ApplicationManager.count == 2); // verify the app is gone | 365 | tryCompare(ApplicationManager, "count", 2); // verify the app is gone |
522 | 366 | verify(ApplicationManager.findApplication(appName) === null); // and it's not in running apps | 366 | verify(ApplicationManager.findApplication(appName) === null); // and it's not in running apps |
523 | 367 | } | 367 | } |
524 | 368 | 368 | ||
525 | @@ -409,8 +409,8 @@ | |||
526 | 409 | 409 | ||
527 | 410 | // restore | 410 | // restore |
528 | 411 | dialerDelegate.restoreFromMaximized(); | 411 | dialerDelegate.restoreFromMaximized(); |
531 | 412 | compare(dashApp.session.lastSurface.visible, true); | 412 | tryCompare(dashApp.session.lastSurface, "visible", true); |
532 | 413 | compare(gmailApp.session.lastSurface.visible, true); | 413 | tryCompare(gmailApp.session.lastSurface, "visible", true); |
533 | 414 | } | 414 | } |
534 | 415 | 415 | ||
535 | 416 | function test_applicationsBecomeVisibleWhenOccludingAppRemoved() { | 416 | function test_applicationsBecomeVisibleWhenOccludingAppRemoved() { |
536 | 417 | 417 | ||
537 | === modified file 'tests/qmltests/Stages/tst_WindowResizeArea.qml' | |||
538 | --- tests/qmltests/Stages/tst_WindowResizeArea.qml 2015-11-30 18:25:47 +0000 | |||
539 | +++ tests/qmltests/Stages/tst_WindowResizeArea.qml 2016-02-17 21:52:10 +0000 | |||
540 | @@ -56,6 +56,7 @@ | |||
541 | 56 | property real widthIncrement: 0 | 56 | property real widthIncrement: 0 |
542 | 57 | property real heightIncrement: 0 | 57 | property real heightIncrement: 0 |
543 | 58 | state: "normal" | 58 | state: "normal" |
544 | 59 | readonly property bool maximized: state == "maximized" | ||
545 | 59 | 60 | ||
546 | 60 | function maximize() { | 61 | function maximize() { |
547 | 61 | state = "maximized" | 62 | state = "maximized" |
548 | 62 | 63 | ||
549 | === modified file 'tests/qmltests/tst_Shell.qml' | |||
550 | --- tests/qmltests/tst_Shell.qml 2016-02-17 21:52:09 +0000 | |||
551 | +++ tests/qmltests/tst_Shell.qml 2016-02-17 21:52:10 +0000 | |||
552 | @@ -2117,6 +2117,7 @@ | |||
553 | 2117 | loadShell("desktop"); | 2117 | loadShell("desktop"); |
554 | 2118 | shell.usageScenario = "desktop"; | 2118 | shell.usageScenario = "desktop"; |
555 | 2119 | waitForRendering(shell); | 2119 | waitForRendering(shell); |
556 | 2120 | |||
557 | 2120 | var appContainer = findChild(shell, "appContainer"); | 2121 | var appContainer = findChild(shell, "appContainer"); |
558 | 2121 | var launcher = findChild(shell, "launcher"); | 2122 | var launcher = findChild(shell, "launcher"); |
559 | 2122 | 2123 |
FAILED: Continuous integration, rev:2112 jenkins. qa.ubuntu. com/job/ unity8- ci/7041/ jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- vivid-touch/ 5984 jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- xenial- touch/456/ console jenkins. qa.ubuntu. com/job/ unity-phablet- qmluitests- vivid/1746 jenkins. qa.ubuntu. com/job/ unity8- qmluitest- xenial- amd64/449 jenkins. qa.ubuntu. com/job/ unity8- vivid-amd64- ci/1641 jenkins. qa.ubuntu. com/job/ unity8- vivid-i386- ci/1641 jenkins. qa.ubuntu. com/job/ unity8- xenial- amd64-ci/ 448 jenkins. qa.ubuntu. com/job/ unity8- xenial- i386-ci/ 447 jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- runner- vivid-touch/ 4623 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- vivid-armhf/ 5995 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- vivid-armhf/ 5995/artifact/ work/output/ *zip*/output. zip s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 26543 jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- runner- xenial- touch/204/ console jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- xenial- armhf/454 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- xenial- armhf/454/ artifact/ work/output/ *zip*/output. zip s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 26544
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/unity8- ci/7041/ rebuild
http://