Merge lp:~nick-dedekind/unity8/desktop-app-focus into lp:unity8
| Status: | Merged |
|---|---|
| Approved by: | Daniel d'Andrada on 2015-05-06 |
| Approved revision: | 1657 |
| Merged at revision: | 1778 |
| Proposed branch: | lp:~nick-dedekind/unity8/desktop-app-focus |
| Merge into: | lp:unity8 |
| Diff against target: |
1407 lines (+864/-180) 24 files modified
qml/Shell.qml (+0/-1) qml/Stages/DecoratedWindow.qml (+1/-0) qml/Stages/DesktopStage.qml (+20/-14) qml/Stages/PhoneStage.qml (+4/-4) qml/Stages/TabletStage.qml (+10/-11) tests/mocks/CMakeLists.txt (+1/-0) tests/mocks/GSettings.1.0/fake_gsettings.h (+2/-2) tests/mocks/GSettings.1.0/plugin.cpp (+6/-0) tests/mocks/Unity/Application/ApplicationManager.cpp (+1/-1) tests/mocks/Utils/CMakeLists.txt (+39/-0) tests/mocks/Utils/HomeKeyWatcher.qml (+21/-0) tests/mocks/Utils/Style.js (+37/-0) tests/mocks/Utils/Utils.qmltypes (+175/-0) tests/mocks/Utils/constants.cpp (+23/-0) tests/mocks/Utils/constants.h (+43/-0) tests/mocks/Utils/plugin.cpp (+73/-0) tests/mocks/Utils/plugin.h (+33/-0) tests/mocks/Utils/qmldir (+5/-0) tests/mocks/Utils/windowstatestorage.cpp (+48/-0) tests/mocks/Utils/windowstatestorage.h (+38/-0) tests/qmltests/Stages/ApplicationCheckBox.qml (+49/-20) tests/qmltests/Stages/tst_DesktopStage.qml (+90/-80) tests/qmltests/tst_Shell.qml (+144/-47) tests/utils/modules/Unity/Test/MouseTouchEmulationCheckbox.qml (+1/-0) |
| To merge this branch: | bzr merge lp:~nick-dedekind/unity8/desktop-app-focus |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Daniel d'Andrada (community) | 2015-04-15 | Approve on 2015-05-06 | |
| PS Jenkins bot | continuous-integration | Needs Fixing on 2015-05-06 | |
| Michael Zanetti (community) | Needs Information on 2015-04-15 | ||
|
Review via email:
|
|||
Commit Message
Fixed desktop stage app focus.
Description of the Change
Fixed desktop stage app focus.
Added mock for Utils plugin so WindowStateStorage positiong can be set up for testing and so it does not backend to SQL.
* Are there any related MPs required for this MP to build/function as expected? Please list.
No
* 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?
N/A
* If you changed the UI, has there been a design review?
N/A
| Daniel d'Andrada (dandrader) wrote : | # |
> I think this has been fixed already.
I'm talking more specifically about revision 1688, "DesktopStage - fix focus switch when user taps on window"
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1647
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
| Michael Zanetti (mzanetti) wrote : | # |
One inline comment. otherwise looks good to me and I'm using this branch already in lp:~mzanetti/unity8/desktop-spread
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1649
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Nick Dedekind (nick-dedekind) wrote : | # |
> > I think this has been fixed already.
>
> I'm talking more specifically about revision 1688, "DesktopStage - fix focus
> switch when user taps on window"
It was fixed for the tap, but not for the open. When you open a new app on desktop stage it doesn't get focus.
- 1650. By Nick Dedekind on 2015-04-20
-
re-added test for click on app window
| Nick Dedekind (nick-dedekind) wrote : | # |
> I think this has been fixed already.
>
> Why are you removing tests like test_tappingOnW
If you revert the change in DesktopStage and run the tests, you will see the failure.
- 1651. By Nick Dedekind on 2015-04-20
-
replaced mouseClick with tap for touch
- 1652. By Nick Dedekind on 2015-04-20
-
test rename
| Nick Dedekind (nick-dedekind) wrote : | # |
> One inline comment. otherwise looks good to me and I'm using this branch
> already in lp:~mzanetti/unity8/desktop-spread
No, I mistook it for the same as the decoration test I added.
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1652
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Daniel d'Andrada (dandrader) wrote : | # |
You should not break focus encapsulation. The DesktopStage delegate item shouldn't directly focus a child item of its DecoratedWindow. It's an implementation detail it doesn't need to know about. Furthermore appDelegate.
The commit below solves these problems:
http://
- 1653. By Nick Dedekind on 2015-04-28
-
don't break focus encasulation
| Nick Dedekind (nick-dedekind) wrote : | # |
> You should not break focus encapsulation. The DesktopStage delegate item
> shouldn't directly focus a child item of its DecoratedWindow. It's an
> implementation detail it doesn't need to know about. Furthermore
> appDelegate.
> which is wrong. That's why you needed to call forceActiveFocus() in there
> (which will recursivelly set focus=true on all its parents).
>
> The commit below solves these problems:
>
> http://
Ok, makes sense. I've committed your changes to my branch.
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1653
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Daniel d'Andrada (dandrader) wrote : | # |
Looks mostly good. Only some minor issues left
In tests/mocks/
-------
"""
+ * Copyright (C) 2012 Canonical, Ltd.
"""
Please update the copyright year.
"""
// local
#include "inputwatcher.h"
#include "qlimitproxymod
#include "unitysortfilte
#include "relativetimefo
#include "timeformatter.h"
#include "unitymenumodel
#include "windowkeysfilt
#include "easingcurve.h"
#include "windowstatesto
#include "constants.h"
"""
Most of those are not local but come from the real plugin, in a different directory.
So it's worth noting it by grouping them separately and including with <foo.h> instead of "foo.h".
In tests/mocks/
-------
"""
* Copyright (C) 2012 Canonical, Ltd.
"""
Please update the copyright year.
In tests/qmltests/
-------
"""
831- * Copyright (C) 2015 Canonical, Ltd.
832+ * Copyright (C) 2013,2014 Canonical, Ltd.
"""
Bogus change. It should be just 2015.
"""
1151 function cleanup() {
1152+ mouseEmulation.
1153 tryCompare(shell, "enabled", true); // make sure greeter didn't leave us in
"""
I don't see why the automated tests have to care about whether this control is checked or not. It has no effect over them.
"""
1132+ Column {
1133+ anchors { left: parent.left; right: parent.right }
1134+ spacing: units.gu(1)
1135+
1136+ Label { text: "Applications"; font.bold: true }
1137+
1138+ Repeater {
1139+ id: appRepeater
1140+ model: ApplicationMana
1141+ ApplicationCheckBox {
1142+ appId: modelData
1143+ }
1144+ }
"""
This is nice but now they don't fit all in the window at the same time, you have to enlarge the window to see the bottom ones. It's time to put the controls column (I mean, all controls, not just these, see the darkgrey Rectangle with id:controls) into a vertical Flickable.
- 1654. By Nick Dedekind on 2015-05-01
-
fixed more focus issues
- 1655. By Nick Dedekind on 2015-05-01
-
review comments
- 1656. By Nick Dedekind on 2015-05-01
-
cleanup focus
| Nick Dedekind (nick-dedekind) wrote : | # |
Focus was still broken when you switch to desktop mode.
Reproduce:
1) make tryShell
2) Select 'Desktop' form factor
3) Log in
Result:
Dash should be focused, but is't
Starting other apps doesn't resolve focus until we click on one.
-------
In fact, it's broken when you switch between all form factors. Looks like we're not picking up changes when we have app focus, but no delegates have been created yet.
Fixed now, and added test for focus on form factor switching.
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1656
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Daniel d'Andrada (dandrader) wrote : | # |
"""
file://
file://
^
"""
Please merge trunk. Your mock Utils plugin is outdated.
| Daniel d'Andrada (dandrader) wrote : | # |
Just noticed an issue with the tst_Shell tests: you're not testing stage switches (eg from TabletStage to DesktopStage) but reloading the entire Shell.qml. This is not what happens when you connect a tablet to a mouse and a keyboard.
Form factor and usage mode are two separate things.
This commit fixes it:
http://
PS: I did it myself as I've work depending on this branch and I didn't want to get blocked.
| Daniel d'Andrada (dandrader) wrote : | # |
> """
> file://
> s/tst_Shell.
> Shell {
> ^
> file://
> :182:5: HomeKeyWatcher is not a type
> HomeKeyWatcher {
> ^
> """
>
> Please merge trunk. Your mock Utils plugin is outdated.
And the fix:
http://
| Nick Dedekind (nick-dedekind) wrote : | # |
> Just noticed an issue with the tst_Shell tests: you're not testing stage
> switches (eg from TabletStage to DesktopStage) but reloading the entire
> Shell.qml. This is not what happens when you connect a tablet to a mouse and a
> keyboard.
>
> Form factor and usage mode are two separate things.
>
> This commit fixes it:
> http://
>
> PS: I did it myself as I've work depending on this branch and I didn't want to
> get blocked.
Good enough for me. Can we make a note to rename the Stages. I don't like the idea of having a Tablet & Desktop stage, when they're actually representing modes ([split]
- 1657. By Nick Dedekind on 2015-05-06
-
merged with ~dandrader/
unity8/ desktop- app-focus
| Michael Zanetti (mzanetti) wrote : | # |
> Good enough for me. Can we make a note to rename the Stages. I don't like the
> idea of having a Tablet & Desktop stage, when they're actually representing
> modes ([split]
Yeah... Actually I think the long term plan is to get rid of them. In the desktop-spread branch I think I figured a way to be able to do all the stages in one codebase by just replacing the maths. So don't get started with renaming everything right now.
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1657
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| 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.
Just the usual autopilot failures.
* Did you make sure that the branch does not contain spurious tags?
Yes.

I think this has been fixed already.
Why are you removing tests like test_tappingOnW indowChangesFoc usedApp?