Merge lp:~dandrader/unity8/childWindows into lp:unity8
- childWindows
- Merge into trunk
Status: | Superseded |
---|---|
Proposed branch: | lp:~dandrader/unity8/childWindows |
Merge into: | lp:unity8 |
Prerequisite: | lp:~dandrader/unity8/miral |
Diff against target: |
1552 lines (+767/-152) 30 files modified
CMakeLists.txt (+1/-1) plugins/WindowManager/TopLevelWindowModel.cpp (+36/-28) plugins/WindowManager/TopLevelWindowModel.h (+2/-0) plugins/WindowManager/Window.h (+0/-1) qml/Components/WindowControlButtons.qml (+2/-0) qml/Stage/ChildWindow.qml (+159/-0) qml/Stage/ChildWindowRepeater.qml (+28/-0) qml/Stage/ChildWindowTree.qml (+127/-0) qml/Stage/DecoratedWindow.qml (+40/-48) qml/Stage/MoveHandler.qml (+23/-18) qml/Stage/Stage.qml (+49/-8) qml/Stage/WindowControlsOverlay.qml (+21/-24) qml/Stage/WindowDecoration.qml (+7/-2) qml/Stage/WindowResizeArea.qml (+3/-2) tests/mocks/Unity/Application/ApplicationInfo.cpp (+9/-1) tests/mocks/Unity/Application/ApplicationInfo.h (+3/-0) tests/mocks/Unity/Application/ApplicationManager.cpp (+9/-0) tests/mocks/Unity/Application/MirSurface.cpp (+43/-0) tests/mocks/Unity/Application/MirSurface.h (+11/-0) tests/mocks/Unity/Application/MirSurfaceItem.cpp (+19/-4) tests/mocks/Unity/Application/MirSurfaceListModel.h (+0/-1) tests/mocks/Unity/Application/SurfaceManager.cpp (+15/-8) tests/mocks/Unity/Application/SurfaceManager.h (+3/-1) tests/mocks/Unity/Application/VirtualKeyboard.cpp (+5/-4) tests/mocks/Unity/Application/resources/Kate.qml (+49/-0) tests/mocks/Unity/Application/resources/KateDialog.qml (+48/-0) tests/mocks/Unity/Application/resources/KateMenu.qml (+41/-0) tests/mocks/Unity/Application/resources/surfaces.qrc (+3/-0) tests/qmltests/Stage/ApplicationCheckBox.qml (+1/-1) tests/qmltests/Stage/tst_WindowResizeArea.qml (+10/-0) |
To merge this branch: | bzr merge lp:~dandrader/unity8/childWindows |
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Unity8 CI Bot | continuous-integration | Needs Fixing | |
Michael Zanetti (community) | Needs Information | ||
Gerry Boland (community) | Needs Information | ||
Nick Dedekind (community) | Abstain | ||
Lukáš Tinkl (community) | Needs Information | ||
Review via email: mp+311974@code.launchpad.net |
This proposal has been superseded by a proposal from 2017-01-19.
Commit message
Initial support for child windows (menus, dialogs, tooltips)
Description of the change
Prereq-archive: ppa:ci-
Good Qt apps to test with: kate, qtcreator
And keep in mind this is just the first iteration.
You can also play with it in "make tryDesktopStage" or "make tryShell" by launching the mock kate application and interacting with its UI to launch menus and dialogs.
* Are there any related MPs required for this MP to build/function as expected? Please list.
https:/
https:/
Tooltips work better with these:
https:/
https:/
* Did you perform an exploratory manual test run of your code change and any related functionality?
Yes, although it's basically new functionality
* 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
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
- 2705. By Andrea Cimitan
-
Fix white text (LP: #1644468)
Approved by: Albert Astals Cid, Unity8 CI Bot
- 2706. By Andrea Cimitan
-
Make MascotLoader in CardCreator flat
Approved by: Albert Astals Cid, Unity8 CI Bot
- 2707. By Andrea Cimitan
-
Make the remaining UbuntuShape flat
Approved by: Albert Astals Cid, Unity8 CI Bot
- 2708. By Andrea Cimitan
-
added dropshadow from panel indicators to dash page header extra panel, so there is right shadow when the extra panel is narrow
Approved by: Albert Astals Cid, Unity8 CI Bot
- 2709. By Andrea Cimitan
-
Look up for expandable template dash category flag
Approved by: Albert Astals Cid, Unity8 CI Bot
- 2710. By Albert Astals Cid
-
Fix PreviewProgress implicitHeight
We actually want this to be the height of the progressbar that we fix so use that and not the implicitHeight (LP: #1641943)
Approved by: Andrea Cimitan, Unity8 CI Bot
- 2711. By Andrea Azzarone
-
Set Mir.cursorName to "grabbing" on first mouse press on a window decoration. Don't wait for press+motion. (LP: #1618078)
Approved by: Lukáš Tinkl, Unity8 CI Bot
- 2712. By Andrea Azzarone
-
Do not show a divider between each quicklist entry but just between each section, similar to how unity7 does. (LP: #1637478)
Approved by: Albert Astals Cid, Unity8 CI Bot
- 2713. By Daniel d'Andrada
-
There's no need for WindowDecoration to access the appDelegate
It damages modularity.
Approved by: Michael Zanetti, Unity8 CI Bot
- 2714. By Brian Douglass
-
Added a setting to enable/disable the indicator dropdown menu.
Approved by: Michael Zanetti, Unity8 CI Bot
- 2715. By Michael Zanetti
-
disable spread interaction while locked (LP: #1641578)
Approved by: Lukáš Tinkl, Unity8 CI Bot
- 2716. By Olivier Tilloy
-
Remove dependency on transitional package. (LP: #1583079)
Approved by: Albert Astals Cid, Unity8 CI Bot
- 2717. By Lukáš Tinkl
-
Enable brightness (laptop backlight) handling on desktop/laptop PCs (LP: #1595947)
Approved by: Michael Zanetti, Unity8 CI Bot
- 2718. By Andrea Azzarone
-
Implement launcher tooltips.
Approved by: Michał Sawicz
- 2719. By Albert Astals Cid
-
Adapt to dummy notification being gone
and warning fix as bonus
Approved by: Lukáš Tinkl, Unity8 CI Bot
- 2720. By Albert Astals Cid
-
Fix autopilot test_lock_screen tests
Approved by: Andrea Cimitan, Unity8 CI Bot
- 2721. By Albert Astals Cid
-
Autopilot: Add more applications to the list for wider screens
Otherwise the test was failing because available_
applications was too short Approved by: Andrea Cimitan, Unity8 CI Bot
- 2722. By Albert Astals Cid
-
Fix autopilot DashHelperTestC
ase.test_ search Approved by: Andrea Cimitan, Unity8 CI Bot
- 2723. By Albert Astals Cid
-
Also install the Screens mock
This way we can run some more autopilot tests in X11
Approved by: Lukáš Tinkl, Unity8 CI Bot
- 2724. By Albert Astals Cid
-
Give default value to gu-px size
Fixes some of the autopilot greeter tests when run under X11
Approved by: Andrea Cimitan, Unity8 CI Bot
- 2725. By CI Train Bot Account
-
Releasing 8.15+17.
04.20161129- 0ubuntu1
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2709
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
- 2726. By Launchpad Translations on behalf of unity-team
-
Launchpad automatic translations update.
Albert Astals Cid (aacid) wrote : | # |
Text conflict in debian/control
Text conflict in qml/Shell.qml
Text conflict in qml/Stage/Stage.qml
Text conflict in tests/mocks/
Text conflict in tests/qmltests/
Text conflict in tests/qmltests/
6 conflicts encountered.
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2729
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
dinamic (dinamic6661) wrote : | # |
tested with tiled and kate (qt5 apps), brief test with tiled and kate, the child windows positioning works, if i move the parrent window, the child windows moves according to parrent's x/y. in the app switcher (alt tab) i see both the parrent and the child window. the menus open in a separate window with a wrong size and position and it usually ends up freezing unity8 when i try to close the menu or or parent. tooltips same as with menus. short video here https:/
ubuntu 17.04 / nouveau
Daniel d'Andrada (dandrader) wrote : | # |
On 01/12/2016 13:47, dinamic wrote:
> tested with tiled and kate (qt5 apps), brief test with tiled and kate, the child windows positioning works, if i move the parrent window, the child windows moves according to parrent's x/y. in the app switcher (alt tab) i see both the parrent and the child window. the menus open in a separate window with a wrong size and position and it usually ends up freezing unity8 when i try to close the menu or or parent. tooltips same as with menus. short video here https:/
>
> ubuntu 17.04 / nouveau
Looks like you have an outdated qtubuntu. Menus should work fine and
child windows should not show in the app switcher.
dinamic (dinamic6661) wrote : | # |
i have qtubuntu-
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2729
https:/
Executed test runs:
FAILURE: 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:2729
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
- 2727. By Lukáš Tinkl
-
Fix the Super key not invoking the dash scope home (LP: #1607427)
Approved by: Daniel d'Andrada, Unity8 CI Bot
- 2728. By Albert Astals Cid
-
Add the Wsuggest-override flag to gcc
While at it mark system includes as such so we don't get warnings we can not fix
Approved by: Michael Zanetti, Unity8 CI Bot
- 2729. By Albert Astals Cid
-
Add support for compiler sanitizers via ECM
- 2730. By Albert Astals Cid
-
Use timeStep as delay time
Passing iterations / speed didn't make much sense since that parameter is a delay in milliseconds and the default parameters would give a value of 5 / units.gu(10) that is smaller than 1 millisecond.
Qt 5.7 calculation for velocity was very unhappy if we moved things so fast in less than 1ms and ignored the movements, so this also makes tests pass on Qt 5.7 (LP: #1642919)
Approved by: Josh Arenson, Unity8 CI Bot
- 2731. By Michael Zanetti
-
Add the ApplicationDrawer
Approved by: Lukáš Tinkl, Unity8 CI Bot
- 2732. By Michael Zanetti
-
tune right edge push
make it less intrusive when accidentally hitting the edge with the mouse
tweak visuals for the mouse case (LP: #1646094)Approved by: Unity8 CI Bot
- 2733. By Michael Zanetti
-
improve close button visiblity when hovering with the mouse
Approved by: Albert Astals Cid, Unity8 CI Bot
- 2734. By Albert Astals Cid
-
Bring back fix for 1517830
Now with autotest \o/ (LP: #1517830)
Approved by: Andrea Cimitan, Unity8 CI Bot
- 2735. By Daniel d'Andrada
-
Fix "make tryApplicationW
indow" No surface was showing up on the screen
Also remove outdated button (feature is no longer there)Approved by: Albert Astals Cid, Unity8 CI Bot
- 2736. By Albert Astals Cid
-
Fix compile warnings in mocks
Approved by: Daniel d'Andrada, Unity8 CI Bot
- 2737. By Josh Arenson
-
Enable the greeter to remember which session the user last logged into
This also fixes a small issue with how the default session was handled. (LP: #1631365)
Approved by: Albert Astals Cid, Unity8 CI Bot
- 2738. By Daniel d'Andrada
-
Take save/restore functions out of WindowResizeArea
They've no relationship with resizing whatsoever.
Approved by: Lukáš Tinkl, Unity8 CI Bot
- 2739. By Michael Zanetti
-
Update virtual touchpad visuals and add a tutorial. (LP: #1585220)
Approved by: Lukáš Tinkl, Unity8 CI Bot
- 2740. By Albert Astals Cid
-
Do not hide panel when launching an application if the mouse is on the panel
Need Functions.
itemUnderMouse because MouseArea. containsMouse returns true when tapping (i.e. no mouse used) on it. Unfortunately the QML testlib do not set the proper value when issueing a mouseMove so i can't add a test that proofs it works, i'll try to propose something upstream and then add the test at a later MR (LP: #1591311)
Approved by: Lukáš Tinkl, Unity8 CI Bot
- 2741. By Pete Woods
-
MenuItemFactory: Add subtitle support to SwitchItem widget
Approved by: Marco Trevisan (Treviño), Michał Sawicz, Unity8 CI Bot
- 2742. By CI Train Bot Account
-
Releasing 8.15+17.
04.20161207. 1-0ubuntu1
Nick Dedekind (nick-dedekind) wrote : | # |
Getting a conflict merging in latest unity8/miral branch.
Text conflict in plugins/
Text conflict in qml/Stage/
Daniel d'Andrada (dandrader) wrote : | # |
> Getting a conflict merging in latest unity8/miral branch.
>
> Text conflict in plugins/
> Text conflict in qml/Stage/
Fixed. Rebased on top of latest unity8/miral.
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2744
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Lukáš Tinkl (lukas-kde) wrote : | # |
Just 2 minor nitpicks, otherwise the code looks good (haven't tested yet):
+ Window *TopLevelWindow
-> const qualifier, it's a getter
+ readonly property bool decorated
-> this could be rewritten to be a direct binding, instead of a function
Lukáš Tinkl (lukas-kde) wrote : | # |
Console is spammed with this warning:
TypeError: Property 'updateSurfaceR
- 2743. By Launchpad Translations on behalf of unity-team
-
Launchpad automatic translations update.
- 2744. By Daniel d'Andrada
-
Let the model deal with some window management decisions
eg: which window to focus, whether to change surface state
unity8 requests and reacts to changes in the model instead of applying them (LP: #1346633)
Approved by: Emanuele Antonio Faraone, Lukáš Tinkl
- 2745. By CI Train Bot Account
-
Releasing 8.15+17.
04.20161215- 0ubuntu1
Daniel d'Andrada (dandrader) wrote : | # |
On 13/12/2016 09:46, Lukáš Tinkl wrote:
> Review: Needs Fixing
>
> Just 2 minor nitpicks, otherwise the code looks good (haven't tested yet):
>
> + Window *TopLevelWindow
>
> -> const qualifier, it's a getter
It's not a getter and it can't be const since the generateId() method it
uses cannot be const.
> + readonly property bool decorated
>
> -> this could be rewritten to be a direct binding, instead of a function
AFAIK both notations work exactly the same. It's syntactic sugar. Made
the change anyway as it's less code.
Daniel d'Andrada (dandrader) wrote : | # |
On 13/12/2016 11:59, Lukáš Tinkl wrote:
> Review: Needs Fixing
>
> Console is spammed with this warning:
>
> TypeError: Property 'updateSurfaceR
Fixed.
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2745
https:/
Executed test runs:
FAILURE: 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:2746
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Lukáš Tinkl (lukas-kde) wrote : | # |
I have a question regarding the (Kate) dialog's placement, caption and focus:
Shouldn't the dialog's titlebar be actually placed under its parent's titlebar, and focused? The font used for the dialog's caption should probably be the same as any other "focused" window; the current way it is suggests the main window in the background is still focused.
Daniel d'Andrada (dandrader) wrote : | # |
On 16/12/2016 12:36, Lukáš Tinkl wrote:
> Review: Needs Information
>
> I have a question regarding the (Kate) dialog's placement, caption and focus:
>
> Shouldn't the dialog's titlebar be actually placed under its parent's titlebar, and focused? The font used for the dialog's caption should probably be the same as any other "focused" window; the current way it is suggests the main window in the background is still focused.
Please don't get lost in the details. This is just the first iteration.
There are loads of things to improve.
Lukáš Tinkl (lukas-kde) wrote : | # |
> On 16/12/2016 12:36, Lukáš Tinkl wrote:
> > Review: Needs Information
> >
> > I have a question regarding the (Kate) dialog's placement, caption and
> focus:
> >
> > Shouldn't the dialog's titlebar be actually placed under its parent's
> titlebar, and focused? The font used for the dialog's caption should probably
> be the same as any other "focused" window; the current way it is suggests the
> main window in the background is still focused.
>
> Please don't get lost in the details. This is just the first iteration.
> There are loads of things to improve.
"The devil is in the detail"
I'm aware of the fact this is a first iteration but I'm sure we don't want to land stuff in a (semi) broken state
Daniel d'Andrada (dandrader) wrote : | # |
On 16/12/2016 13:00, Lukáš Tinkl wrote:
>> On 16/12/2016 12:36, Lukáš Tinkl wrote:
>>> Review: Needs Information
>>>
>>> I have a question regarding the (Kate) dialog's placement, caption and
>> focus:
>>> Shouldn't the dialog's titlebar be actually placed under its parent's
>> titlebar, and focused? The font used for the dialog's caption should probably
>> be the same as any other "focused" window; the current way it is suggests the
>> main window in the background is still focused.
>>
>> Please don't get lost in the details. This is just the first iteration.
>> There are loads of things to improve.
> "The devil is in the detail"
>
> I'm aware of the fact this is a first iteration but I'm sure we don't want to land stuff in a (semi) broken state
>
>
As long as it's not causing regressions on existing features, it
shouldn't be a problem.
Proper positioning of child dialogs hasn't been implemented yet. Will
likely involve work on miral.
Eg: Open a child dialog. Move it to the side of its top-level parent.
Now move that top-level parent right to the edge of the display. The
child dialog will be completely offscreen.
Lukáš Tinkl (lukas-kde) wrote : | # |
And, is this supposed to work in anything else than the desktop mode? Because in phone/tablet modes, it doesn't do anything
Daniel d'Andrada (dandrader) wrote : | # |
On 16/12/2016 13:32, Lukáš Tinkl wrote:
> Review: Needs Information
>
> And, is this supposed to work in anything else than the desktop mode? Because in phone/tablet modes, it doesn't do anything
phone/tablet is uncharted territory with regards to child windows. Need
input from design etc.
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2748
https:/
Executed test runs:
FAILURE: 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:2749
https:/
Executed test runs:
FAILURE: 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:2750
https:/
Executed test runs:
FAILURE: 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:2751
https:/
Executed test runs:
FAILURE: 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:2752
https:/
Executed test runs:
FAILURE: 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:2753
https:/
Executed test runs:
FAILURE: 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:2754
https:/
Executed test runs:
FAILURE: 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:2755
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:2756
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 : | # |
some notes from testing it:
* Menus are opening, but they close themselves again immediately again.
* Dragging around child surfaces (in my case a Toolbar in a QWidget application) will get unity8 to spin on 100% cpu in miral::
Gerry Boland (gerboland) wrote : | # |
> some notes from testing it:
>
> * Menus are opening, but they close themselves again immediately again.
>
> * Dragging around child surfaces (in my case a Toolbar in a QWidget
> application) will get unity8 to spin on 100% cpu in miral::
> and not recover from that.
I'm testing QtCreator and Kate, and not hitting either of these so far. The menu thing especially. But it does sound familiar, I think I had it at one stage, it was down to a focus issue.
Just for our info, are you using a USB mouse, or laptop trackpad, or touch?
Michael Zanetti (mzanetti) wrote : | # |
laptop touchpad
Daniel d'Andrada (dandrader) wrote : | # |
The problem of tooltips not redrawing is bug 1652109
Daniel d'Andrada (dandrader) wrote : | # |
Another issue fixed elsewhere: https:/
- 2746. By CI Train Bot Account
-
Resync trunk.
- 2747. By Launchpad Translations on behalf of unity-team
-
Launchpad automatic translations update.
- 2748. By Launchpad Translations on behalf of unity-team
-
Launchpad automatic translations update.
- 2749. By Timo Jyrinki
-
No change rebuild
- 2750. By Michael Terry
-
Run the qmluitests.sh autopkg test against the installed package.
This is faster and more accurate than rebuilding unity8 and running tests from the build dir.
Approved by: Albert Astals Cid, Unity8 CI Bot
- 2751. By Nick Dedekind
-
Added registry for application menus
Approved by: Michael Zanetti, Unity8 CI Bot
- 2752. By Michał Sawicz
-
Application menus
- 2753. By Michael Zanetti
-
PreviewRatingInput: Use displayText instead of text to enable/disable the Send button (LP: #1595910)
Approved by: Andrea Cimitan, Christian Dywan, Unity8 CI Bot
- 2754. By Michael Zanetti
-
Add a D-Bus interface to control some debug facilities on the fly
Approved by: Gerry Boland, Unity8 CI Bot
- 2755. By Michael Zanetti
-
some launcher workarounds for the snapping
Approved by: Albert Astals Cid, Unity8 CI Bot
- 2756. By dobey
-
Remove the payments widget and dependency on libpay as no longer needed.
Approved by: Andrea Cimitan, Unity8 CI Bot
- 2757. By Lukáš Tinkl
-
Fix touch window controls being unreachable when the overlay is being displayed (LP: #1648167)
Approved by: Josh Arenson, Unity8 CI Bot
- 2758. By Albert Astals Cid
-
Give focus to one of the buttons of the dialog
This one you can use Tab/Alt+Tab to navigate through them.
Unfortunately there's still the problem that if there's some other elements that take focus (like indicators), focus will also travel through them, but this is an start.
Approved by: Daniel d'Andrada, Unity8 CI Bot
- 2759. By Albert Astals Cid
-
tst_WindowResiz
eArea: Use default values for mouseFlick speed and iterations (LP: #1651580) Approved by: Daniel d'Andrada, Unity8 CI Bot
- 2760. By Albert Astals Cid
-
Require Qt 5.6 & misc fixes
Require Qt 5.6:
We align with what we're really testing
We can use Q_ENUM/Q_FLAG instead of Q_ENUMS/Q_FLAGS (Qt 5.5)CursorImageInfo.cpp
Join two QString::arg into oneSessionsModel.cpp
UsersModel.cpp
Remove useless Q_Ddashconnection.cpp
ColorTheme.cpp
UserMetrics.cpp
horizontaljournaltest. cpp
listviewwithpageheadersectione xternalmodeltes t.cpp
organicgridtest.cpp
verticaljournaltest.cpp
QObjects should have the Q_OBJECT macroindicatorsmodel.h
fakeindicatorsmodel.h
There's no Roles enum, removeappdrawerproxym
odel.cpp
MirSurfaceItem.cpp
Add & to the foreach variableappdrawerproxym
odel.cpp
Make the string comparison fastereasingcurve.h
Remove QEasingCurve::Type declaration, it's already in Qtunitysortfilter
proxymodelqml. h
fake_scopesoverview.h
Make some parent functions accessible to remove clang warningsPageList.cpp
unitymenumodel.cpp
qinputdeviceinfo_mock. cpp
Better way to iterate the containerGreeter.cpp
Cheaper env var checkingmediaplayer.cpp
mediaplayer.h
Rename timerEvent, clang was not happy since QObject has another oneApplicationInfo.h
Mark as overrideMockAppDrawerMo
del.cpp
launchermodeltest.cpp
screens.cpp
Fix warningfake_previewwid
getmodel. h
Forward declare struct the same way it is defined laterfake_scopes.cpp
Safer connecthorizontaljourn
altest. cpp
verticaljournaltest.cpp
testutil.cpp
Use at instead of [] in temporarylaunchermodelas
test.cpp
Remove unused member
Use toModelIndex() instead of value<QModelIndex>() Approved by: Michael Zanetti, Unity8 CI Bot
- 2761. By Lukáš Tinkl
-
Fixup paths for window state storage in snappy environment
Approved by: Albert Astals Cid, Unity8 CI Bot
- 2762. By Josh Arenson
-
Allow the scopes list to automatically scroll when a scope is being dragged past the bounds of the screen. (LP: #1575319)
Approved by: Andrea Cimitan, Unity8 CI Bot
- 2763. By Daniel van Vugt
-
Deprecate usage of Mir's input resampling, instead opting for:
Shell: Raw native input events
Apps: Qt's built-in touch compression input resampling algorithm,
and other toolkits are expected to provide their own.This fixes LP: #1497105 nicely, allowing apps to receive the full-speed
input stream (if they ask their toolkit to give it to them).As an added bonus this also eliminates the 0-16.9ms (average 8.4ms) of
input lag that apps under Unity8 would experience. We do still have the
problem of output lag making everything still look laggy but I am
working to eliminate that soon in Mir 0.26.0. (LP: #1497105, #1591328)Approved by: Gerry Boland, Unity8 CI Bot
- 2764. By Lukáš Tinkl
-
Add Unity.Platform mock for our tests (LP: #1655336)
Approved by: Michał Sawicz
- 2765. By Michał Sawicz
-
Nuke leftover Platform in IndicatorsManager
Approved by: Nick Dedekind
- 2766. By CI Train Bot Account
-
Releasing 8.15+17.
04.20170110. 4-0ubuntu1 - 2767. By CI Train Bot Account
-
Resync trunk.
- 2768. By Launchpad Translations on behalf of unity-team
-
Launchpad automatic translations update.
Albert Astals Cid (aacid) wrote : | # |
Text conflict in tests/qmltests/
1 conflicts encountered.
Daniel d'Andrada (dandrader) wrote : | # |
On 16/01/2017 06:46, Albert Astals Cid wrote:
> Text conflict in tests/qmltests/
> 1 conflicts encountered.
Fixed
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2769
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:/
- 2769. By Launchpad Translations on behalf of unity-team
-
Launchpad automatic translations update.
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2769
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:/
Nick Dedekind (nick-dedekind) : | # |
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2770
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:2770
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:/
- 2770. By Launchpad Translations on behalf of unity-team
-
Launchpad automatic translations update.
Michael Zanetti (mzanetti) wrote : | # |
I still see some issues:
* the right click context menu shows up but closes immediately again
* the code completion popup in kate seems to not be updated properly.
this you said would be a known bug. also, normal tooltips seem to work fine, this just happens with the code completion windows (which probably aren't tooltip windows)
Gerry Boland (gerboland) wrote : | # |
+++ qml/Stage/
Just a thought:
+ readonly property bool maximized: false
+ readonly property bool maximizedLeft: false
+ readonly property bool maximizedRight: false
+ readonly property bool maximizedHorizo
+ readonly property bool maximizedVertic
+ readonly property bool maximizedTopLeft: false
+ readonly property bool maximizedTopRight: false
+ readonly property bool maximizedBottom
+ readonly property bool maximizedBottom
Only one of these can be set true at any time, am I right? In that case, perhaps an enum would be less wordy, and reduce chances of logic error (multiple trues)
MaximizedState.qml:
pragma Singleton
import QtQuick 2.5
QtObject {
id: singleton
property bool maximized: 0
property bool maximizedLeft: 1
property bool maximizedRight: 2
...
}
and then use readonly property MaximizedState instead.
Daniel d'Andrada (dandrader) wrote : | # |
On 19/01/2017 11:44, Gerry Boland wrote:
> +++ qml/Stage/
>
> Just a thought:
>
> + readonly property bool maximized: false
> + readonly property bool maximizedLeft: false
> + readonly property bool maximizedRight: false
> + readonly property bool maximizedHorizo
> + readonly property bool maximizedVertic
> + readonly property bool maximizedTopLeft: false
> + readonly property bool maximizedTopRight: false
> + readonly property bool maximizedBottom
> + readonly property bool maximizedBottom
>
> Only one of these can be set true at any time, am I right? In that case, perhaps an enum would be less wordy, and reduce chances of logic error (multiple trues)
>
> MaximizedState.qml:
>
> pragma Singleton
> import QtQuick 2.5
> QtObject {
> id: singleton
>
> property bool maximized: 0
> property bool maximizedLeft: 1
> property bool maximizedRight: 2
> ...
> }
>
> and then use readonly property MaximizedState instead.
I'm just mimicking the existing API in Stage.qml, where those are used
in several places. Having all those booleans separate seem to be
convenient for use in states and expressions over there.
Gerry Boland (gerboland) wrote : | # |
+// Meant to be created with a Loader to circunvent
typo, "circumvent"
+++ qml/Stage/
Wanted to double-check this with you:
+ WindowDecoration {
+ onPressed: root.surface.
+ onPressedChanged: if (d.moveHandler) { d.moveHandler.
You're listening to both of MouseArea's pressed signals. Since the order is emission isn't guaranteed, you're sure both slots are roughly independent (one doesn't impact the other)? Just in case future Qt's reversed the order..
Gerry Boland (gerboland) wrote : | # |
+ // Do not hold on to a dead surface so that it can be destroyed.
+ surface: root.surface && root.surface.live ? root.surface : null
Could you add a FIXME here, as I think it should not be QML's job to release the MirSurface if its backing surface goes away. Instead backing MirSurface should go away but the MirSurfaceItem can live on with the last drawn frame and properties.
Daniel d'Andrada (dandrader) wrote : | # |
On 19/01/2017 11:58, Gerry Boland wrote:
> Review: Needs Information
>
> +// Meant to be created with a Loader to circunvent
> typo, "circumvent"
Fixed, thanks.
> +++ qml/Stage/
> Wanted to double-check this with you:
>
> + WindowDecoration {
> + onPressed: root.surface.
> + onPressedChanged: if (d.moveHandler) { d.moveHandler.
>
> You're listening to both of MouseArea's pressed signals. Since the order is emission isn't guaranteed, you're sure both slots are roughly independent (one doesn't impact the other)? Just in case future Qt's reversed the order..
Again, am copy-pasting from elsewhere (DecoratedWindo
case). I think those two are rather independent (order not particularly
important).
Gerry Boland (gerboland) wrote : | # |
+++ qml/Stage/
+ function restore(someBool, someEnum) {}
cruft?
+ var pos = mapToItem(
very good question. It is working yeah?
Daniel d'Andrada (dandrader) wrote : | # |
On 19/01/2017 12:01, Gerry Boland wrote:
> + // Do not hold on to a dead surface so that it can be destroyed.
> + surface: root.surface && root.surface.live ? root.surface : null
>
> Could you add a FIXME here, as I think it should not be QML's job to release the MirSurface if its backing surface goes away. Instead backing MirSurface should go away but the MirSurfaceItem can live on with the last drawn frame and properties.
Done.
Michael Zanetti (mzanetti) wrote : | # |
There's an issue with alt+tab:
* open an application that has only a toplevel window (e.g. terminal app)
* open an application (e.g. kate) and open a child window (e.g. the file open dialog).
* press alt+tab quickly, it will focus the terminal app
* press alt+tab again, it will focus kate's file open dialog, but not bring it to front.
=========
shouldn't this have ~dandrader/
========
some inline comments
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2770
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 : | # |
playing with tryShell, opening kate and then opening the menu dialogs, it would seem to me that they should close again when clicking outside of them? Currently allows going into situation where you e.g. open a couple of those menus and then when you click the menu in the title bar, the menu will appear below those in-app menus
Daniel d'Andrada (dandrader) wrote : | # |
On 19/01/2017 12:08, Gerry Boland wrote:
> +++ qml/Stage/
> + function restore(someBool, someEnum) {}
> cruft?
Removed
>
> + var pos = mapToItem(
> very good question. It is working yeah?
It must, otherwise resize wouldn't be working. :D
According to lukaz it gets from the context, to from the closest Item
parent...
/me shrugs
But it does deserve a refactoring at some point. This is quite messy.
Daniel d'Andrada (dandrader) wrote : | # |
On 19/01/2017 13:31, Michael Zanetti wrote:
> Review: Needs Information
>
> playing with tryShell, opening kate and then opening the menu dialogs, it would seem to me that they should close again when clicking outside of them? Currently allows going into situation where you e.g. open a couple of those menus and then when you click the menu in the title bar, the menu will appear below those in-app menus
That fake kate has a very crude menu implementation. They are there just
so that you can check positioning and, most-importantly, its decorations
(or lack thereof).
A ChildWindow that has a dialog surface will get shadows, title bar and
be movable with touch (ie, get touch controls when appropriate). But a
ChildWindow that has a menu surface will only get shadows and nothing else.
Daniel d'Andrada (dandrader) wrote : | # |
On 19/01/2017 11:23, Michael Zanetti wrote:
> I still see some issues:
>
> * the right click context menu shows up but closes immediately again
Still can't reproduce it. :/
> * the code completion popup in kate seems to not be updated properly.
> this you said would be a known bug. also, normal tooltips seem to work fine, this just happens with the code completion windows (which probably aren't tooltip windows)
Works fine if you install those:
https:/
https:/
updated it, btw)
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2773
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 : | # |
On 19/01/2017 12:33, Michael Zanetti wrote:
> Review: Needs Fixing
>
> There's an issue with alt+tab:
>
> * open an application that has only a toplevel window (e.g. terminal app)
> * open an application (e.g. kate) and open a child window (e.g. the file open dialog).
> * press alt+tab quickly, it will focus the terminal app
> * press alt+tab again, it will focus kate's file open dialog, but not bring it to front.
That's miral bug 1658085
> shouldn't this have ~dandrader/
Yes. Done.
> Diff comments:
>
>> === added file 'qml/Stage/
>> --- qml/Stage/
>> +++ qml/Stage/
>> @@ -0,0 +1,156 @@
>> [...]
>> +
>> + width: surface ? surface.size.width : 0
>> + height: surface ? surface.size.height : 0
>> +
>> + // Make it get shown and hidden with a fade in/out effect
>> + opacity: surface && surface.state !== Mir.MinimizedState && surface.state !== Mir.HiddenState ? 1.0 : 0.0
>> + Behavior on opacity { UbuntuNumberAni
> I wonder if this might be better set to SnapDuration instead of the default of FastDuration.
I don't really have a preference. Want me to change to that?
>
>> === added file 'qml/Stage/
>> --- qml/Stage/
>> +++ qml/Stage/
>> @@ -0,0 +1,129 @@
>> +/*
>> [...]
>> + }
>> +
>> + readonly property bool windowedTransit
> hmm... is this used somewhere? if it's readonly and set to false, what is it good for?
As the comment above says, that's API that MoveHandler expects its
target to have.
>
>> === modified file 'qml/Stage/
>> --- qml/Stage/
>> +++ qml/Stage/
>> @@ -117,35 +119,38 @@
>> target.
>> }
>>
>> - var pos = mapToItem(
>> + var pos = mapToItem(
> good question, does it?
It must, otherwise resize wouldn't be working. :D
According to lukaz it gets from the context, to from the closest Item
parent...
/me shrugs
But it does deserve a refactoring at some point. This is quite messy.
>
>> === modified file 'tests/
>> --- tests/mocks/
>> +++ tests/mocks/
>> @@ -122,7 +123,9 @@
>> auto surface = surfaceManager-
>> Mir::NormalType,
>> fullscreen() ? Mir::Fullscreen
>> - m_screenshotFil
>> + nullptr, /* parentSurface */
> is there a space too much?
Yes. Fixed.
- 2771. By Lukáš Tinkl
-
Fix keymap not being applied on the shell itself (LP: #1626435)
Approved by: Gerry Boland, Unity8 CI Bot
- 2772. By Albert Astals Cid
-
Limit tab-focus travelling on dialogs with a fence
Approved by: Lukáš Tinkl, Unity8 CI Bot
- 2773. By Lukáš Tinkl
-
Shell dialog improvements (kbd focus, mouse eater)
Approved by: Michael Zanetti, Unity8 CI Bot
- 2774. By Albert Astals Cid
-
Restore focus to where it was when our ShellDialogs get unloaded
UITK Dialogs want to have this feature but it seems to be broken, so i'm fixing it here first (since we use dialogs in a kind of special way)
I'll try to fix UITK nextApproved by: Andrea Cimitan, Unity8 CI Bot
- 2775. By Michael Terry
-
Simplify the lightdm mock to make future greeter improvements easier to test.
I simplified the mock liblightdm to avoid separate files for the Private classes. That can all go into the main files. The separation isn't worth wading through the files to find what you want.
And I dropped the mock LightDM plugin entirely. (opting instead for a tiny "mock()" API call on the real plugin that returns an object that can be used to manipulate our mock liblightdm, if we're in testing mode)
Approved by: Albert Astals Cid, Unity8 CI Bot
- 2776. By Josh Arenson
-
Add a test for the session chooser icon in the greeter's sessions list
Approved by: Albert Astals Cid, Unity8 CI Bot
- 2777. By Michael Terry
-
Add support for guest sessions in unity8-greeter.
Adds support for the "hasGuestAccount" and "selectGuest" LightDM hints and does so largely by having the users model report a "*guest" user, rather than adding special support in qml.
Approved by: Albert Astals Cid, Unity8 CI Bot
- 2778. By Michael Terry
-
Add support for LightDM hints for manual logins and hiding normal users.
Approved by: Albert Astals Cid, Unity8 CI Bot
- 2779. By Michael Terry
-
Use a model for PAM prompts, supporting more possible interactions.
- This lets us show more than one message and more than one prompt from PAM.
- We now also show error text when a user enters a wrong password. This matches unity7-greeter behavior.
- Similarly, when a fingerprint login is attempted, but we are demanding a real login (e.g. the user hasn't logged in before), we now show a message to explain that a bit.
- Simplify the Greeter/View interactions a bit. We no longer need to signal quite as much events, since the view reflects the prompts model directly.
- Fix keyboard focus highlight handling among prompts.
- Update and expand the tests.
Approved by: Albert Astals Cid
- 2780. By Albert Astals Cid
-
Update current session after changing the user
This matches unity7 greeter behaviour, i.e. if you change the session and then change the user, the session that shows up is the last session that new user logged in and not the new session you selected in the previous user
Approved by: Josh Arenson, Unity8 CI Bot
- 2781. By Albert Astals Cid
-
Add keyboard navigation for Indicators
Esc closes
Left/Right selects prev/next indicatorApproved by: Michael Zanetti, Unity8 CI Bot
- 2782. By Nick Dedekind
-
Added Alt+F10 shortcut to open app menus. (LP: #1656896)
Approved by: Albert Astals Cid, Unity8 CI Bot
- 2783. By Daniel d'Andrada
-
Simplify DecoratedWindow
Reduce the number of nested MouseAreas
Approved by: Nick Dedekind, Unity8 CI Bot
- 2784. By Nick Dedekind
-
Fixed menu layout width calculations. (LP: #1657050)
Approved by: Albert Astals Cid, Unity8 CI Bot
- 2785. By Michael Zanetti
-
hint the launcher to indicate a successful size change to the user (LP: #1646457)
Approved by: Lukáš Tinkl, Unity8 CI Bot
- 2786. By Lukáš Tinkl
-
Start searching directly as you type, w/o having to first focus/click the search field.
Approved by: Michael Zanetti, Unity8 CI Bot
- 2787. By Michael Zanetti
-
Improvements for the appdrawer
Allow cancelling of the reveal gesture
move the app store uri to a gsetting (LP: #1648173)Approved by: Lukáš Tinkl, Unity8 CI Bot
- 2788. By Michael Zanetti
-
Adjust home key to still focus the dash instead of messing with the drawer
Approved by: Lukáš Tinkl
- 2789. By Albert Astals Cid
-
a window -> the current window
Approved by: Lukáš Tinkl
- 2790. By Lukáš Tinkl
-
Add a test for the real implementation of WindowStateStorage
Approved by: Albert Astals Cid, Unity8 CI Bot
- 2791. By Albert Astals Cid
-
There's no spreadDelegate_ anymore
Goes from ~9 to ~3 minutes
Approved by: Michael Zanetti, Unity8 CI Bot
- 2792. By Michael Terry
-
Fix grouping of autopkg output and allow optionally passing arguments to installed test scripts.
Approved by: Albert Astals Cid, Unity8 CI Bot
- 2793. By Lukáš Tinkl
-
Use a four finger gesture to open the drawer, much like in u7
Approved by: Michael Zanetti, Unity8 CI Bot
- 2794. By Michael Zanetti
-
allow 4 finger simulation with mousetouchadaptor
Approved by: Lukáš Tinkl, Unity8 CI Bot
- 2795. By Nick Dedekind
-
Skip Panel::
test_drag_ indicator_ item_down_ shows_menu Approved by: Lukáš Tinkl, Michał Sawicz, Unity8 CI Bot
- 2796. By Daniel d'Andrada
-
Remove unnecessary warning message
It's being printed on every initialization for quite a while now and it's not prompting us
to perform any action. Thus this can't be really a warning if it's always there.Approved by: Michael Zanetti, Unity8 CI Bot
- 2797. By CI Train Bot Account
-
Releasing 8.15+17.
04.20170124- 0ubuntu1 - 2798. By Launchpad Translations on behalf of unity-team
-
Launchpad automatic translations update.
- 2799. By Daniel d'Andrada
-
Initial support for child windows (menus, dialogs, tooltips)
Unmerged revisions
Preview Diff
1 | === modified file 'CMakeLists.txt' |
2 | --- CMakeLists.txt 2017-01-10 14:46:09 +0000 |
3 | +++ CMakeLists.txt 2017-01-19 15:00:39 +0000 |
4 | @@ -70,7 +70,7 @@ |
5 | find_package(Qt5Concurrent 5.6 REQUIRED) |
6 | find_package(Qt5Sql 5.6 REQUIRED) |
7 | |
8 | -pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=23) |
9 | +pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=24) |
10 | pkg_check_modules(GEONAMES REQUIRED geonames>=0.2) |
11 | pkg_check_modules(GIO REQUIRED gio-2.0>=2.32) |
12 | pkg_check_modules(GLIB REQUIRED glib-2.0>=2.32) |
13 | |
14 | === modified file 'plugins/WindowManager/TopLevelWindowModel.cpp' |
15 | --- plugins/WindowManager/TopLevelWindowModel.cpp 2016-12-06 14:42:26 +0000 |
16 | +++ plugins/WindowManager/TopLevelWindowModel.cpp 2017-01-19 15:00:39 +0000 |
17 | @@ -176,18 +176,13 @@ |
18 | // No point in signaling anything if we're resetting the whole model |
19 | } |
20 | |
21 | - int id = generateId(); |
22 | - Window *window = new Window(id, this); |
23 | - if (surface) { |
24 | - window->setSurface(surface); |
25 | - } |
26 | + Window *window = createWindow(surface); |
27 | + |
28 | m_windowModel.prepend(ModelEntry(window, application)); |
29 | if (surface) { |
30 | connectSurface(surface); |
31 | } |
32 | |
33 | - connectWindow(window); |
34 | - |
35 | if (m_modelState == InsertingState) { |
36 | endInsertRows(); |
37 | Q_EMIT countChanged(); |
38 | @@ -322,34 +317,47 @@ |
39 | } |
40 | } |
41 | |
42 | +Window *TopLevelWindowModel::createWindow(unityapi::MirSurfaceInterface *surface) |
43 | +{ |
44 | + int id = generateId(); |
45 | + Window *qmlWindow = new Window(id, this); |
46 | + connectWindow(qmlWindow); |
47 | + if (surface) { |
48 | + qmlWindow->setSurface(surface); |
49 | + } |
50 | + return qmlWindow; |
51 | +} |
52 | + |
53 | void TopLevelWindowModel::onSurfaceCreated(unityapi::MirSurfaceInterface *surface) |
54 | { |
55 | DEBUG_MSG << "(" << surface << ")"; |
56 | - if (surface->type() == Mir::InputMethodType) { |
57 | - int id = generateId(); |
58 | - Window *qmlWindow = new Window(id, this); |
59 | - connectWindow(qmlWindow); |
60 | - qmlWindow->setSurface(surface); |
61 | - setInputMethodWindow(qmlWindow); |
62 | + |
63 | + if (surface->parentSurface()) { |
64 | + // Wrap it in a Window so that we keep focusedWindow() up to date. |
65 | + Window *window = createWindow(surface); |
66 | + connect(surface, &QObject::destroyed, window, [=](){ |
67 | + window->setSurface(nullptr); |
68 | + window->deleteLater(); |
69 | + }); |
70 | } else { |
71 | - auto application = m_applicationManager->findApplicationWithSurface(surface); |
72 | - if (application) { |
73 | - prependSurface(surface, application); |
74 | + if (surface->type() == Mir::InputMethodType) { |
75 | + setInputMethodWindow(createWindow(surface)); |
76 | } else { |
77 | - // Must be a prompt session. No need to do add it as a prompt surface is not top-level. |
78 | - // It will show up in the ApplicationInfoInterface::promptSurfaceList of some application. |
79 | - // Still wrap it in a Window though, so that we keep focusedWindow() up to date. |
80 | - int id = generateId(); |
81 | - Window *promptWindow = new Window(id, this); |
82 | - connectWindow(promptWindow); |
83 | - promptWindow->setSurface(surface); |
84 | - connect(surface, &QObject::destroyed, promptWindow, [=](){ |
85 | - promptWindow->setSurface(nullptr); |
86 | - promptWindow->deleteLater(); |
87 | - }); |
88 | + auto *application = m_applicationManager->findApplicationWithSurface(surface); |
89 | + if (application) { |
90 | + prependSurface(surface, application); |
91 | + } else { |
92 | + // Must be a prompt session. No need to do add it as a prompt surface is not top-level. |
93 | + // It will show up in the ApplicationInfoInterface::promptSurfaceList of some application. |
94 | + // Still wrap it in a Window though, so that we keep focusedWindow() up to date. |
95 | + Window *promptWindow = createWindow(surface); |
96 | + connect(surface, &QObject::destroyed, promptWindow, [=](){ |
97 | + promptWindow->setSurface(nullptr); |
98 | + promptWindow->deleteLater(); |
99 | + }); |
100 | + } |
101 | } |
102 | } |
103 | - // TODO: handle surfaces that are neither top-level windows nor input method. eg: child dialogs, popups, menus |
104 | } |
105 | |
106 | void TopLevelWindowModel::removeAt(int index) |
107 | |
108 | === modified file 'plugins/WindowManager/TopLevelWindowModel.h' |
109 | --- plugins/WindowManager/TopLevelWindowModel.h 2016-12-06 14:42:26 +0000 |
110 | +++ plugins/WindowManager/TopLevelWindowModel.h 2017-01-19 15:00:39 +0000 |
111 | @@ -220,6 +220,8 @@ |
112 | |
113 | void activateTopMostWindowWithoutId(int forbiddenId); |
114 | |
115 | + Window *createWindow(unity::shell::application::MirSurfaceInterface *surface); |
116 | + |
117 | struct ModelEntry { |
118 | ModelEntry() {} |
119 | ModelEntry(Window *window, |
120 | |
121 | === modified file 'plugins/WindowManager/Window.h' |
122 | --- plugins/WindowManager/Window.h 2016-11-30 19:24:02 +0000 |
123 | +++ plugins/WindowManager/Window.h 2017-01-19 15:00:39 +0000 |
124 | @@ -32,7 +32,6 @@ |
125 | } |
126 | } |
127 | |
128 | - |
129 | Q_DECLARE_LOGGING_CATEGORY(UNITY_WINDOW) |
130 | |
131 | /** |
132 | |
133 | === modified file 'qml/Components/WindowControlButtons.qml' |
134 | --- qml/Components/WindowControlButtons.qml 2016-10-27 14:54:48 +0000 |
135 | +++ qml/Components/WindowControlButtons.qml 2017-01-19 15:00:39 +0000 |
136 | @@ -29,6 +29,7 @@ |
137 | property bool windowIsMaximized: false |
138 | property bool closeButtonShown: true |
139 | property bool maximizeButtonShown: true |
140 | + property bool minimizeButtonVisible: true |
141 | property bool overlayShown |
142 | |
143 | signal closeClicked() |
144 | @@ -75,6 +76,7 @@ |
145 | height: parent.height |
146 | width: height |
147 | onClicked: root.minimizeClicked() |
148 | + visible: root.minimizeButtonVisible |
149 | |
150 | // We dont want touch events to fall through to parent, |
151 | // otherwise the containsMouse will not work. |
152 | |
153 | === added file 'qml/Stage/ChildWindow.qml' |
154 | --- qml/Stage/ChildWindow.qml 1970-01-01 00:00:00 +0000 |
155 | +++ qml/Stage/ChildWindow.qml 2017-01-19 15:00:39 +0000 |
156 | @@ -0,0 +1,159 @@ |
157 | +/* |
158 | + * Copyright (C) 2016 Canonical, Ltd. |
159 | + * |
160 | + * This program is free software; you can redistribute it and/or modify |
161 | + * it under the terms of the GNU General Public License as published by |
162 | + * the Free Software Foundation; version 3. |
163 | + * |
164 | + * This program is distributed in the hope that it will be useful, |
165 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
166 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
167 | + * GNU General Public License for more details. |
168 | + * |
169 | + * You should have received a copy of the GNU General Public License |
170 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
171 | + */ |
172 | + |
173 | +import QtQuick 2.4 |
174 | +import Ubuntu.Components 1.3 |
175 | +import Unity.Application 0.1 |
176 | + |
177 | +Item { |
178 | + id: root |
179 | + |
180 | + // Set from outside. |
181 | + property var surface |
182 | + property Item boundsItem |
183 | + property Item target |
184 | + property alias requestedWidth: surfaceContainer.requestedWidth |
185 | + property alias requestedHeight: surfaceContainer.requestedHeight |
186 | + |
187 | + width: surface ? surface.size.width : 0 |
188 | + height: surface ? surface.size.height : 0 |
189 | + |
190 | + // Make it get shown and hidden with a fade in/out effect |
191 | + opacity: surface && surface.state !== Mir.MinimizedState && surface.state !== Mir.HiddenState ? 1.0 : 0.0 |
192 | + Behavior on opacity { UbuntuNumberAnimation {} } |
193 | + visible: opacity !== 0.0 // make it transparent to input as well |
194 | + |
195 | + readonly property bool dragging: windowResizeArea.dragging || d.touchOverlayDragging || d.moveHandlerDragging |
196 | + |
197 | + QtObject { |
198 | + id: d |
199 | + readonly property bool decorated: surface ? surface.type === Mir.UtilityType |
200 | + || surface.type === Mir.DialogType |
201 | + || surface.type === Mir.NormalType |
202 | + : false |
203 | + |
204 | + readonly property bool moveable: decorated |
205 | + readonly property bool resizeable: decorated |
206 | + |
207 | + property alias decoration: decorationLoader.item |
208 | + property alias moveHandler: moveHandlerLoader.item |
209 | + |
210 | + readonly property bool touchOverlayDragging: touchOverlayLoader.item ? touchOverlayLoader.item.dragging : false |
211 | + readonly property bool moveHandlerDragging: moveHandlerLoader.item ? moveHandlerLoader.item.dragging : false |
212 | + } |
213 | + |
214 | + WindowResizeArea { |
215 | + id: windowResizeArea |
216 | + anchors { |
217 | + top: decorationLoader.top |
218 | + bottom: parent.bottom |
219 | + left: parent.left; right: parent.right |
220 | + } |
221 | + target: root.target |
222 | + boundsItem: root.boundsItem |
223 | + minWidth: units.gu(10) |
224 | + minHeight: units.gu(10) |
225 | + borderThickness: units.gu(2) |
226 | + enabled: d.resizeable |
227 | + visible: enabled |
228 | + onPressed: root.surface.activate(); |
229 | + } |
230 | + |
231 | + BorderImage { |
232 | + property real shadowThickness: root.surface && root.surface.focused ? units.gu(2) : units.gu(1.5) |
233 | + anchors { |
234 | + top: decorationLoader.top |
235 | + bottom: parent.bottom |
236 | + left: parent.left; right: parent.right |
237 | + margins: -shadowThickness |
238 | + } |
239 | + source: "../graphics/dropshadow2gu.sci" |
240 | + opacity: .3 |
241 | + } |
242 | + |
243 | + Loader { |
244 | + id: decorationLoader |
245 | + anchors.bottom: root.top |
246 | + anchors.left: root.left |
247 | + anchors.right: root.right |
248 | + |
249 | + visible: active |
250 | + active: d.decorated |
251 | + |
252 | + height: item ? item.height : 0 |
253 | + |
254 | + sourceComponent: Component { |
255 | + WindowDecoration { |
256 | + height: units.gu(3) |
257 | + title: root.surface ? root.surface.name : "" |
258 | + active: root.surface ? root.surface.focused : false |
259 | + closeButtonVisible: false |
260 | + minimizeButtonVisible: false |
261 | + maximizeButtonShown: false |
262 | + onPressed: root.surface.activate(); |
263 | + onPressedChanged: if (d.moveHandler) { d.moveHandler.handlePressedChanged(pressed, pressedButtons, mouseX, mouseY); } |
264 | + onPositionChanged: if (d.moveHandler) { |
265 | + d.moveHandler.handlePositionChanged(mouse); |
266 | + } |
267 | + onReleased: if (d.moveHandler) { d.moveHandler.handleReleased(); } |
268 | + } |
269 | + } |
270 | + } |
271 | + |
272 | + Loader { |
273 | + id: moveHandlerLoader |
274 | + active: d.moveable |
275 | + sourceComponent: Component { |
276 | + MoveHandler { |
277 | + target: root.target |
278 | + buttonsWidth: d.decoration ? d.decoration.buttonsWidth : 0 |
279 | + boundsItem: root.boundsItem |
280 | + boundsTopMargin: decorationLoader.height |
281 | + } |
282 | + } |
283 | + } |
284 | + |
285 | + SurfaceContainer { |
286 | + id: surfaceContainer |
287 | + |
288 | + // Do not hold on to a dead surface so that it can be destroyed. |
289 | + // FIXME It should not be QML's job to release the MirSurface if its backing surface goes away. Instead backing |
290 | + // MirSurface should go away but the MirSurfaceItem should be able to live on with the last drawn frame |
291 | + // and properties. |
292 | + surface: root.surface && root.surface.live ? root.surface : null |
293 | + |
294 | + requestedWidth: surface ? surface.size.width : 0 |
295 | + requestedHeight: surface ? surface.size.height : 0 |
296 | + |
297 | + // TODO ChildWindow parent will probably want to control those |
298 | + interactive: true |
299 | + consumesInput: true |
300 | + } |
301 | + |
302 | + Loader { |
303 | + id: touchOverlayLoader |
304 | + active: d.resizeable || d.moveable |
305 | + anchors.top: decorationLoader.top |
306 | + anchors.bottom: parent.bottom |
307 | + anchors.left: parent.left |
308 | + anchors.right: parent.right |
309 | + sourceComponent: Component { WindowControlsOverlay { |
310 | + target: root.target |
311 | + resizeArea: windowResizeArea |
312 | + boundsItem: root.boundsItem |
313 | + } } |
314 | + } |
315 | +} |
316 | |
317 | === added file 'qml/Stage/ChildWindowRepeater.qml' |
318 | --- qml/Stage/ChildWindowRepeater.qml 1970-01-01 00:00:00 +0000 |
319 | +++ qml/Stage/ChildWindowRepeater.qml 2017-01-19 15:00:39 +0000 |
320 | @@ -0,0 +1,28 @@ |
321 | +/* |
322 | + * Copyright (C) 2016 Canonical, Ltd. |
323 | + * |
324 | + * This program is free software; you can redistribute it and/or modify |
325 | + * it under the terms of the GNU General Public License as published by |
326 | + * the Free Software Foundation; version 3. |
327 | + * |
328 | + * This program is distributed in the hope that it will be useful, |
329 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
330 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
331 | + * GNU General Public License for more details. |
332 | + * |
333 | + * You should have received a copy of the GNU General Public License |
334 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
335 | + */ |
336 | + |
337 | +import QtQuick 2.4 |
338 | + |
339 | +// Meant to be created with a Loader to circumvent the "ChildWindowTree is instantiated recursively" error from the QML engine |
340 | +Repeater { |
341 | + id: root |
342 | + property Item boundsItem |
343 | + delegate: ChildWindowTree { |
344 | + surface: model.surface |
345 | + z: root.count - model.index |
346 | + boundsItem: root.boundsItem |
347 | + } |
348 | +} |
349 | |
350 | === added file 'qml/Stage/ChildWindowTree.qml' |
351 | --- qml/Stage/ChildWindowTree.qml 1970-01-01 00:00:00 +0000 |
352 | +++ qml/Stage/ChildWindowTree.qml 2017-01-19 15:00:39 +0000 |
353 | @@ -0,0 +1,127 @@ |
354 | +/* |
355 | + * Copyright (C) 2016 Canonical, Ltd. |
356 | + * |
357 | + * This program is free software; you can redistribute it and/or modify |
358 | + * it under the terms of the GNU General Public License as published by |
359 | + * the Free Software Foundation; version 3. |
360 | + * |
361 | + * This program is distributed in the hope that it will be useful, |
362 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
363 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
364 | + * GNU General Public License for more details. |
365 | + * |
366 | + * You should have received a copy of the GNU General Public License |
367 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
368 | + */ |
369 | + |
370 | +import QtQuick 2.4 |
371 | +import Ubuntu.Components 1.3 |
372 | +import Unity.Application 0.1 |
373 | + |
374 | +Item { |
375 | + id: root |
376 | + |
377 | + property alias surface: childWindow.surface |
378 | + property real displacementX: 0 |
379 | + property real displacementY: 0 |
380 | + property alias boundsItem: childWindow.boundsItem |
381 | + |
382 | + x: surface ? surface.position.x + displacementX : 0 |
383 | + y: surface ? surface.position.y + displacementY : 0 |
384 | + width: childWindow.width |
385 | + height: childWindow.height |
386 | + |
387 | + //// |
388 | + // API expected by MoveHandler (and some by WindowResizeArea as well) |
389 | + readonly property bool maximized: false |
390 | + readonly property bool maximizedLeft: false |
391 | + readonly property bool maximizedRight: false |
392 | + readonly property bool maximizedHorizontally: false |
393 | + readonly property bool maximizedVertically: false |
394 | + readonly property bool maximizedTopLeft: false |
395 | + readonly property bool maximizedTopRight: false |
396 | + readonly property bool maximizedBottomLeft: false |
397 | + readonly property bool maximizedBottomRight: false |
398 | + readonly property bool anyMaximized: maximized || maximizedLeft || maximizedRight || maximizedHorizontally || maximizedVertically || |
399 | + maximizedTopLeft || maximizedTopRight || maximizedBottomLeft || maximizedBottomRight |
400 | + |
401 | + readonly property bool canBeCornerMaximized: false |
402 | + readonly property bool canBeMaximizedLeftRight: false |
403 | + readonly property bool canBeMaximized: false |
404 | + |
405 | + readonly property var resizeArea: QtObject { |
406 | + property real normalWidth: units.gu(1) |
407 | + property real normalHeight: units.gu(1) |
408 | + } |
409 | + |
410 | + readonly property bool windowedTransitionRunning: false |
411 | + |
412 | + // NB: those bindings will be overwritten by MoveHandler when you first move the window |
413 | + property real windowedX: x |
414 | + property real windowedY: y |
415 | + |
416 | + |
417 | + property real restoredX |
418 | + property real restoredY |
419 | + |
420 | + state: "restored" |
421 | + // end of API expected by MoveHandler |
422 | + //// |
423 | + |
424 | + //// |
425 | + // API expected by WindowResizeArea |
426 | + property real windowedWidth: childWindow.width |
427 | + property real windowedHeight: childWindow.height |
428 | + // end of API expected by WindowResizeArea |
429 | + //// |
430 | + |
431 | + //// |
432 | + // API expected by WindowControlsOverlay |
433 | + function activate() { |
434 | + surface.activate(); |
435 | + } |
436 | + // end of API expected by WindowControlsOverlay |
437 | + //// |
438 | + |
439 | + Binding { |
440 | + target: root.surface |
441 | + when: childWindow.dragging |
442 | + property: "requestedPosition" |
443 | + value: Qt.point(root.windowedX - root.displacementX, |
444 | + root.windowedY - root.displacementY); |
445 | + } |
446 | + |
447 | + // It's a separate Item so that a window can be hid independently of its children |
448 | + ChildWindow { |
449 | + id: childWindow |
450 | + target: root |
451 | + requestedWidth: root.windowedWidth |
452 | + requestedHeight: root.windowedHeight |
453 | + } |
454 | + |
455 | + Connections { |
456 | + target: root.surface |
457 | + onFocusRequested: { |
458 | + root.surface.activate(); |
459 | + } |
460 | + } |
461 | + |
462 | + // Using a loader here mainly to circunvent the "ChildWindowTree is instantiated recursively" error from the QML engine |
463 | + Loader { |
464 | + id: childRepeaterLoader |
465 | + source: "ChildWindowRepeater.qml" |
466 | + active: root.surface && root.surface.childSurfaceList.count > 0 |
467 | + Binding { |
468 | + target: childRepeaterLoader.item |
469 | + when: childRepeaterLoader.item |
470 | + property: "model" |
471 | + value: root.surface ? root.surface.childSurfaceList : null |
472 | + } |
473 | + Binding { |
474 | + target: childRepeaterLoader.item |
475 | + when: childRepeaterLoader.item |
476 | + property: "boundsItem" |
477 | + value: root.boundsItem |
478 | + } |
479 | + } |
480 | +} |
481 | |
482 | === modified file 'qml/Stage/DecoratedWindow.qml' |
483 | --- qml/Stage/DecoratedWindow.qml 2016-12-12 11:16:47 +0000 |
484 | +++ qml/Stage/DecoratedWindow.qml 2017-01-19 15:00:39 +0000 |
485 | @@ -67,8 +67,7 @@ |
486 | readonly property int heightIncrement: !counterRotate ? applicationWindow.heightIncrement : applicationWindow.widthIncrement |
487 | |
488 | property alias overlayShown: decoration.overlayShown |
489 | - property alias stageWidth: moveHandler.stageWidth |
490 | - property alias stageHeight: moveHandler.stageHeight |
491 | + property alias boundsItem: moveHandler.boundsItem |
492 | readonly property alias dragging: moveHandler.dragging |
493 | |
494 | readonly property Item clientAreaItem: applicationWindow |
495 | @@ -196,18 +195,19 @@ |
496 | ] |
497 | } |
498 | |
499 | - MouseArea { |
500 | + WindowDecoration { |
501 | + id: decoration |
502 | + closeButtonVisible: root.application.appId !== "unity8-dash" |
503 | + objectName: "appWindowDecoration" |
504 | + |
505 | anchors { left: parent.left; top: parent.top; right: parent.right } |
506 | height: units.gu(3) |
507 | |
508 | + title: applicationWindow.title |
509 | + |
510 | opacity: root.hasDecoration ? Math.min(1, root.showDecoration) : 0 |
511 | - |
512 | Behavior on opacity { UbuntuNumberAnimation { } } |
513 | |
514 | - drag.target: Item {} |
515 | - drag.filterChildren: true |
516 | - drag.threshold: 0 |
517 | - |
518 | onPressed: root.decorationPressed(); |
519 | onPressedChanged: moveHandler.handlePressedChanged(pressed, pressedButtons, mouseX, mouseY) |
520 | onPositionChanged: moveHandler.handlePositionChanged(mouse) |
521 | @@ -216,47 +216,39 @@ |
522 | moveHandler.handleReleased(); |
523 | } |
524 | |
525 | - WindowDecoration { |
526 | - id: decoration |
527 | - closeButtonVisible: root.application.appId !== "unity8-dash" |
528 | - objectName: "appWindowDecoration" |
529 | - anchors.fill: parent |
530 | - title: applicationWindow.title |
531 | - |
532 | - onCloseClicked: root.closeClicked(); |
533 | - onMaximizeClicked: { root.decorationPressed(); root.maximizeClicked(); } |
534 | - onMaximizeHorizontallyClicked: { root.decorationPressed(); root.maximizeHorizontallyClicked(); } |
535 | - onMaximizeVerticallyClicked: { root.decorationPressed(); root.maximizeVerticallyClicked(); } |
536 | - onMinimizeClicked: root.minimizeClicked(); |
537 | - |
538 | - enableMenus: { |
539 | - return active && |
540 | - surface && |
541 | - (PanelState.focusedPersistentSurfaceId === surface.persistentId && !PanelState.decorationsVisible) |
542 | - } |
543 | - menu: sharedAppModel.model |
544 | - |
545 | - Indicators.SharedUnityMenuModel { |
546 | - id: sharedAppModel |
547 | - property var menus: surface ? ApplicationMenuRegistry.getMenusForSurface(surface.persistentId) : [] |
548 | - property var menuService: menus.length > 0 ? menus[0] : undefined |
549 | - |
550 | - busName: menuService ? menuService.service : "" |
551 | - menuObjectPath: menuService && menuService.menuPath ? menuService.menuPath : "" |
552 | - actions: menuService && menuService.actionPath ? { "unity": menuService.actionPath } : {} |
553 | - } |
554 | - |
555 | - Connections { |
556 | - target: ApplicationMenuRegistry |
557 | - onSurfaceMenuRegistered: { |
558 | - if (surface && surfaceId === surface.persistentId) { |
559 | - sharedAppModel.menus = Qt.binding(function() { return surface ? ApplicationMenuRegistry.getMenusForSurface(surface.persistentId) : [] }); |
560 | - } |
561 | + onCloseClicked: root.closeClicked(); |
562 | + onMaximizeClicked: { root.decorationPressed(); root.maximizeClicked(); } |
563 | + onMaximizeHorizontallyClicked: { root.decorationPressed(); root.maximizeHorizontallyClicked(); } |
564 | + onMaximizeVerticallyClicked: { root.decorationPressed(); root.maximizeVerticallyClicked(); } |
565 | + onMinimizeClicked: root.minimizeClicked(); |
566 | + |
567 | + enableMenus: { |
568 | + return active && |
569 | + surface && |
570 | + (PanelState.focusedPersistentSurfaceId === surface.persistentId && !PanelState.decorationsVisible) |
571 | + } |
572 | + menu: sharedAppModel.model |
573 | + |
574 | + Indicators.SharedUnityMenuModel { |
575 | + id: sharedAppModel |
576 | + property var menus: surface ? ApplicationMenuRegistry.getMenusForSurface(surface.persistentId) : [] |
577 | + property var menuService: menus.length > 0 ? menus[0] : undefined |
578 | + |
579 | + busName: menuService ? menuService.service : "" |
580 | + menuObjectPath: menuService && menuService.menuPath ? menuService.menuPath : "" |
581 | + actions: menuService && menuService.actionPath ? { "unity": menuService.actionPath } : {} |
582 | + } |
583 | + |
584 | + Connections { |
585 | + target: ApplicationMenuRegistry |
586 | + onSurfaceMenuRegistered: { |
587 | + if (surface && surfaceId === surface.persistentId) { |
588 | + sharedAppModel.menus = Qt.binding(function() { return surface ? ApplicationMenuRegistry.getMenusForSurface(surface.persistentId) : [] }); |
589 | } |
590 | - onSurfaceMenuUnregistered: { |
591 | - if (surface && surfaceId === surface.persistentId) { |
592 | - sharedAppModel.menus = Qt.binding(function() { return surface ? ApplicationMenuRegistry.getMenusForSurface(surface.persistentId) : [] }); |
593 | - } |
594 | + } |
595 | + onSurfaceMenuUnregistered: { |
596 | + if (surface && surfaceId === surface.persistentId) { |
597 | + sharedAppModel.menus = Qt.binding(function() { return surface ? ApplicationMenuRegistry.getMenusForSurface(surface.persistentId) : [] }); |
598 | } |
599 | } |
600 | } |
601 | |
602 | === modified file 'qml/Stage/MoveHandler.qml' |
603 | --- qml/Stage/MoveHandler.qml 2016-12-12 16:45:09 +0000 |
604 | +++ qml/Stage/MoveHandler.qml 2017-01-19 15:00:39 +0000 |
605 | @@ -19,15 +19,14 @@ |
606 | import Ubuntu.Components 1.3 |
607 | import Utils 0.1 |
608 | import "../Components" |
609 | -import "../Components/PanelState" |
610 | |
611 | QtObject { |
612 | id: root |
613 | |
614 | property Item target // appDelegate |
615 | - property int stageWidth |
616 | - property int stageHeight |
617 | property real buttonsWidth: 0 |
618 | + property Item boundsItem |
619 | + property real boundsTopMargin: 0 |
620 | |
621 | readonly property bool dragging: priv.dragging |
622 | |
623 | @@ -79,7 +78,10 @@ |
624 | // length of the triggerArea square diagonal |
625 | var diagLength = Math.sqrt(2 * priv.triggerArea * priv.triggerArea); |
626 | var ratio = 1 - (distance / diagLength); |
627 | - return bx > 0 && bx <= stageWidth && by > 0 && by <= stageHeight ? ratio : 1; // everything "outside" of our square from the center is 1 |
628 | + |
629 | + // everything "outside" of our square from the center is 1 |
630 | + var mousePosBoundsCoords = target.mapToItem(root.boundsItem, bx, by); |
631 | + return root.boundsItem.contains(mousePosBoundsCoords) ? ratio : 1; |
632 | } |
633 | property real progress: 0 |
634 | } |
635 | @@ -117,35 +119,38 @@ |
636 | target.requestRestore(); |
637 | } |
638 | |
639 | - var pos = mapToItem(target.parent, mouse.x, mouse.y); |
640 | + var pos = mapToItem(target.parent, mouse.x, mouse.y); // How can that work if we're just a QtObject (not an Item)? |
641 | + var bounds = boundsItem.mapToItem(target.parent, 0, 0, boundsItem.width, boundsItem.height); |
642 | + bounds.y += boundsTopMargin; |
643 | + bounds.height -= boundsTopMargin; |
644 | // Use integer coordinate values to ensure that target is left in a pixel-aligned |
645 | // position. Mouse movement could have subpixel precision, yielding a fractional |
646 | // mouse position. |
647 | target.windowedX = Math.round(pos.x - priv.distanceX); |
648 | - target.windowedY = Math.round(Math.max(pos.y - priv.distanceY, PanelState.panelHeight)); |
649 | + target.windowedY = Math.round(Math.max(pos.y - priv.distanceY, bounds.top)); |
650 | |
651 | if (sensingPoints) { // edge/corner detection when dragging via the touch overlay |
652 | - if (sensingPoints.topLeft.x < priv.triggerArea && sensingPoints.topLeft.y < PanelState.panelHeight + priv.triggerArea |
653 | + if (sensingPoints.topLeft.x < priv.triggerArea && sensingPoints.topLeft.y < bounds.top + priv.triggerArea |
654 | && target.canBeCornerMaximized) { // top left |
655 | - priv.progress = priv.progressInCorner(0, PanelState.panelHeight, sensingPoints.topLeft.x, sensingPoints.topLeft.y); |
656 | + priv.progress = priv.progressInCorner(bounds.left, bounds.top, sensingPoints.topLeft.x, sensingPoints.topLeft.y); |
657 | priv.resetEdges(); |
658 | priv.nearTopLeftCorner = true; |
659 | root.fakeMaximizeTopLeftAnimationRequested(priv.progress); |
660 | - } else if (sensingPoints.topRight.x > stageWidth - priv.triggerArea && sensingPoints.topRight.y < PanelState.panelHeight + priv.triggerArea |
661 | + } else if (sensingPoints.topRight.x > bounds.right - priv.triggerArea && sensingPoints.topRight.y < bounds.top + priv.triggerArea |
662 | && target.canBeCornerMaximized) { // top right |
663 | - priv.progress = priv.progressInCorner(stageWidth, PanelState.panelHeight, sensingPoints.topRight.x, sensingPoints.topRight.y); |
664 | + priv.progress = priv.progressInCorner(bounds.right, bounds.top, sensingPoints.topRight.x, sensingPoints.topRight.y); |
665 | priv.resetEdges(); |
666 | priv.nearTopRightCorner = true; |
667 | root.fakeMaximizeTopRightAnimationRequested(priv.progress); |
668 | - } else if (sensingPoints.bottomLeft.x < priv.triggerArea && sensingPoints.bottomLeft.y > stageHeight - priv.triggerArea |
669 | + } else if (sensingPoints.bottomLeft.x < priv.triggerArea && sensingPoints.bottomLeft.y > bounds.bottom - priv.triggerArea |
670 | && target.canBeCornerMaximized) { // bottom left |
671 | - priv.progress = priv.progressInCorner(0, stageHeight, sensingPoints.bottomLeft.x, sensingPoints.bottomLeft.y); |
672 | + priv.progress = priv.progressInCorner(bounds.left, bounds.bottom, sensingPoints.bottomLeft.x, sensingPoints.bottomLeft.y); |
673 | priv.resetEdges(); |
674 | priv.nearBottomLeftCorner = true; |
675 | root.fakeMaximizeBottomLeftAnimationRequested(priv.progress); |
676 | - } else if (sensingPoints.bottomRight.x > stageWidth - priv.triggerArea && sensingPoints.bottomRight.y > stageHeight - priv.triggerArea |
677 | + } else if (sensingPoints.bottomRight.x > bounds.right - priv.triggerArea && sensingPoints.bottomRight.y > bounds.bottom - priv.triggerArea |
678 | && target.canBeCornerMaximized) { // bottom right |
679 | - priv.progress = priv.progressInCorner(stageWidth, stageHeight, sensingPoints.bottomRight.x, sensingPoints.bottomRight.y); |
680 | + priv.progress = priv.progressInCorner(bounds.right, bounds.bottom, sensingPoints.bottomRight.x, sensingPoints.bottomRight.y); |
681 | priv.resetEdges(); |
682 | priv.nearBottomRightCorner = true; |
683 | root.fakeMaximizeBottomRightAnimationRequested(priv.progress); |
684 | @@ -154,13 +159,13 @@ |
685 | priv.resetEdges(); |
686 | priv.nearLeftEdge = true; |
687 | root.fakeMaximizeLeftAnimationRequested(priv.progress); |
688 | - } else if (sensingPoints.right.x > stageWidth - priv.triggerArea && target.canBeMaximizedLeftRight) { // right |
689 | - priv.progress = MathUtils.clampAndProject(sensingPoints.right.x, stageWidth - priv.triggerArea, stageWidth, 0, 1); |
690 | + } else if (sensingPoints.right.x > bounds.right - priv.triggerArea && target.canBeMaximizedLeftRight) { // right |
691 | + priv.progress = MathUtils.clampAndProject(sensingPoints.right.x, bounds.right - priv.triggerArea, bounds.right, 0, 1); |
692 | priv.resetEdges(); |
693 | priv.nearRightEdge = true; |
694 | root.fakeMaximizeRightAnimationRequested(priv.progress); |
695 | - } else if (sensingPoints.top.y < PanelState.panelHeight + priv.triggerArea && target.canBeMaximized) { // top |
696 | - priv.progress = MathUtils.clampAndProject(sensingPoints.top.y, PanelState.panelHeight + priv.triggerArea, 0, 0, 1); |
697 | + } else if (sensingPoints.top.y < bounds.top + priv.triggerArea && target.canBeMaximized) { // top |
698 | + priv.progress = MathUtils.clampAndProject(sensingPoints.top.y, bounds.top + priv.triggerArea, 0, 0, 1); |
699 | priv.resetEdges(); |
700 | priv.nearTopEdge = true; |
701 | root.fakeMaximizeAnimationRequested(priv.progress); |
702 | |
703 | === modified file 'qml/Stage/Stage.qml' |
704 | --- qml/Stage/Stage.qml 2017-01-03 12:04:08 +0000 |
705 | +++ qml/Stage/Stage.qml 2017-01-19 15:00:39 +0000 |
706 | @@ -665,6 +665,13 @@ |
707 | } |
708 | } |
709 | |
710 | + Item { |
711 | + id: boundariesForWindowPlacement |
712 | + anchors.fill: parent |
713 | + anchors.topMargin: PanelState.panelHeight |
714 | + visible: false |
715 | + } |
716 | + |
717 | Repeater { |
718 | id: appRepeater |
719 | model: topLevelSurfaceList |
720 | @@ -833,7 +840,6 @@ |
721 | readonly property var surface: model.window.surface |
722 | readonly property var window: model.window |
723 | |
724 | - readonly property alias resizeArea: resizeArea |
725 | readonly property alias focusedSurface: decoratedWindow.focusedSurface |
726 | readonly property bool dragging: touchControls.overlayShown ? touchControls.dragging : decoratedWindow.dragging |
727 | |
728 | @@ -890,7 +896,7 @@ |
729 | screenWidth: appContainer.width |
730 | screenHeight: appContainer.height |
731 | leftMargin: root.leftMargin |
732 | - minimumY: PanelState.panelHeight |
733 | + minimumY: boundariesForWindowPlacement.y |
734 | } |
735 | |
736 | Connections { |
737 | @@ -1520,7 +1526,7 @@ |
738 | anchors.margins: touchControls.overlayShown ? borderThickness/2 : -borderThickness |
739 | |
740 | target: appDelegate |
741 | - minimumY: PanelState.panelHeight // disallow resizing up past Panel |
742 | + boundsItem: boundariesForWindowPlacement |
743 | minWidth: units.gu(10) |
744 | minHeight: units.gu(10) |
745 | borderThickness: units.gu(2) |
746 | @@ -1539,7 +1545,7 @@ |
747 | anchors.top: appDelegate.top |
748 | application: model.application |
749 | surface: model.window.surface |
750 | - active: appDelegate.focus |
751 | + active: model.window.focused |
752 | focus: true |
753 | interactive: root.interactive |
754 | showDecoration: 1 |
755 | @@ -1548,8 +1554,7 @@ |
756 | width: implicitWidth |
757 | height: implicitHeight |
758 | highlightSize: windowInfoItem.iconMargin / 2 |
759 | - stageWidth: appContainer.width |
760 | - stageHeight: appContainer.height |
761 | + boundsItem: boundariesForWindowPlacement |
762 | |
763 | requestedWidth: appDelegate.requestedWidth |
764 | requestedHeight: appDelegate.requestedHeight |
765 | @@ -1604,11 +1609,12 @@ |
766 | |
767 | WindowControlsOverlay { |
768 | id: touchControls |
769 | + anchors.fill: appDelegate |
770 | target: appDelegate |
771 | + resizeArea: resizeArea |
772 | enabled: false |
773 | visible: enabled |
774 | - stageWidth: appContainer.width |
775 | - stageHeight: appContainer.height |
776 | + boundsItem: boundariesForWindowPlacement |
777 | |
778 | onFakeMaximizeAnimationRequested: if (!appDelegate.maximized) fakeRectangle.maximize(amount, true) |
779 | onFakeMaximizeLeftAnimationRequested: if (!appDelegate.maximizedLeft) fakeRectangle.maximizeLeft(amount, true) |
780 | @@ -1703,6 +1709,41 @@ |
781 | sourceSize.height: height |
782 | } |
783 | } |
784 | + |
785 | + Item { |
786 | + // Group all child windows in this item so that we can fade them out together when going to the spread |
787 | + // (and fade them in back again when returning from it) |
788 | + readonly property bool stageOnProperState: root.state === "windowed" |
789 | + || root.state === "staged" |
790 | + || root.state === "stagedWithSideStage" |
791 | + |
792 | + // TODO: Is it worth the extra cost of layering to avoid the opacity artifacts of intersecting children? |
793 | + // Btw, will involve more than uncommenting the line below as children won't necessarily fit this item's |
794 | + // geometry. This is just a reference. |
795 | + //layer.enabled: opacity !== 0.0 && opacity !== 1.0 |
796 | + |
797 | + opacity: stageOnProperState ? 1.0 : 0.0 |
798 | + visible: opacity !== 0.0 // make it transparent to input as well |
799 | + Behavior on opacity { UbuntuNumberAnimation {} } |
800 | + |
801 | + Repeater { |
802 | + id: childWindowRepeater |
803 | + model: appDelegate.surface ? appDelegate.surface.childSurfaceList : null |
804 | + |
805 | + delegate: ChildWindowTree { |
806 | + surface: model.surface |
807 | + |
808 | + // Account for the displacement caused by window decoration in the top-level surface |
809 | + // Ie, the top-level surface is not positioned at (0,0) of this ChildWindow's parent (appDelegate) |
810 | + displacementX: appDelegate.clientAreaItem.x |
811 | + displacementY: appDelegate.clientAreaItem.y |
812 | + |
813 | + boundsItem: boundariesForWindowPlacement |
814 | + |
815 | + z: childWindowRepeater.count - model.index |
816 | + } |
817 | + } |
818 | + } |
819 | } |
820 | } |
821 | } |
822 | |
823 | === modified file 'qml/Stage/WindowControlsOverlay.qml' |
824 | --- qml/Stage/WindowControlsOverlay.qml 2016-12-27 22:09:12 +0000 |
825 | +++ qml/Stage/WindowControlsOverlay.qml 2017-01-19 15:00:39 +0000 |
826 | @@ -18,17 +18,14 @@ |
827 | import Ubuntu.Components 1.3 |
828 | import Ubuntu.Gestures 0.1 |
829 | import Unity.Application 0.1 |
830 | -import "../Components/PanelState" |
831 | |
832 | Item { |
833 | id: root |
834 | - enabled: target && !target.fullscreen |
835 | - anchors.fill: target |
836 | |
837 | // to be set from outside |
838 | property Item target // appDelegate |
839 | - property alias stageWidth: moveHandler.stageWidth |
840 | - property alias stageHeight: moveHandler.stageHeight |
841 | + property WindowResizeArea resizeArea |
842 | + property Item boundsItem |
843 | |
844 | // to be read from outside |
845 | readonly property alias overlayShown: overlay.visible |
846 | @@ -90,9 +87,7 @@ |
847 | |
848 | QtObject { |
849 | id: priv |
850 | - readonly property var resizeArea: root.target && root.target.resizeArea ? root.target.resizeArea : null |
851 | - readonly property bool ensureWindow: root.target.state == "normal" || root.target.state == "restored" |
852 | - readonly property bool dragging: moveHandler.dragging || (resizeArea && resizeArea.dragging) |
853 | + readonly property bool dragging: moveHandler.dragging || (root.resizeArea && root.resizeArea.dragging) |
854 | |
855 | function getSensingPoints() { |
856 | var xPoints = []; |
857 | @@ -162,6 +157,8 @@ |
858 | objectName: "moveHandler" |
859 | target: root.target |
860 | |
861 | + boundsItem: root.boundsItem |
862 | + |
863 | onFakeMaximizeAnimationRequested: root.fakeMaximizeAnimationRequested(amount) |
864 | onFakeMaximizeLeftAnimationRequested: root.fakeMaximizeLeftAnimationRequested(amount) |
865 | onFakeMaximizeRightAnimationRequested: root.fakeMaximizeRightAnimationRequested(amount) |
866 | @@ -193,65 +190,65 @@ |
867 | ResizeGrip { // top left |
868 | anchors.horizontalCenter: parent.left |
869 | anchors.verticalCenter: parent.top |
870 | - visible: priv.ensureWindow || target.maximizedBottomRight |
871 | - resizeTarget: priv.resizeArea |
872 | + visible: root.enabled || target.maximizedBottomRight |
873 | + resizeTarget: root.resizeArea |
874 | } |
875 | |
876 | ResizeGrip { // top center |
877 | anchors.horizontalCenter: parent.horizontalCenter |
878 | anchors.verticalCenter: parent.top |
879 | rotation: 45 |
880 | - visible: priv.ensureWindow || target.maximizedHorizontally || target.maximizedBottomLeft || target.maximizedBottomRight |
881 | - resizeTarget: priv.resizeArea |
882 | + visible: root.enabled || target.maximizedHorizontally || target.maximizedBottomLeft || target.maximizedBottomRight |
883 | + resizeTarget: root.resizeArea |
884 | } |
885 | |
886 | ResizeGrip { // top right |
887 | anchors.horizontalCenter: parent.right |
888 | anchors.verticalCenter: parent.top |
889 | rotation: 90 |
890 | - visible: priv.ensureWindow || target.maximizedBottomLeft |
891 | - resizeTarget: priv.resizeArea |
892 | + visible: root.enabled || target.maximizedBottomLeft |
893 | + resizeTarget: root.resizeArea |
894 | } |
895 | |
896 | ResizeGrip { // right |
897 | anchors.horizontalCenter: parent.right |
898 | anchors.verticalCenter: parent.verticalCenter |
899 | rotation: 135 |
900 | - visible: priv.ensureWindow || target.maximizedVertically || target.maximizedLeft || |
901 | + visible: root.enabled || target.maximizedVertically || target.maximizedLeft || |
902 | target.maximizedTopLeft || target.maximizedBottomLeft |
903 | - resizeTarget: priv.resizeArea |
904 | + resizeTarget: root.resizeArea |
905 | } |
906 | |
907 | ResizeGrip { // bottom right |
908 | anchors.horizontalCenter: parent.right |
909 | anchors.verticalCenter: parent.bottom |
910 | - visible: priv.ensureWindow || target.maximizedTopLeft |
911 | - resizeTarget: priv.resizeArea |
912 | + visible: root.enabled || target.maximizedTopLeft |
913 | + resizeTarget: root.resizeArea |
914 | } |
915 | |
916 | ResizeGrip { // bottom center |
917 | anchors.horizontalCenter: parent.horizontalCenter |
918 | anchors.verticalCenter: parent.bottom |
919 | rotation: 45 |
920 | - visible: priv.ensureWindow || target.maximizedHorizontally || target.maximizedTopLeft || target.maximizedTopRight |
921 | - resizeTarget: priv.resizeArea |
922 | + visible: root.enabled || target.maximizedHorizontally || target.maximizedTopLeft || target.maximizedTopRight |
923 | + resizeTarget: root.resizeArea |
924 | } |
925 | |
926 | ResizeGrip { // bottom left |
927 | anchors.horizontalCenter: parent.left |
928 | anchors.verticalCenter: parent.bottom |
929 | rotation: 90 |
930 | - visible: priv.ensureWindow || target.maximizedTopRight |
931 | - resizeTarget: priv.resizeArea |
932 | + visible: root.enabled || target.maximizedTopRight |
933 | + resizeTarget: root.resizeArea |
934 | } |
935 | |
936 | ResizeGrip { // left |
937 | anchors.horizontalCenter: parent.left |
938 | anchors.verticalCenter: parent.verticalCenter |
939 | rotation: 135 |
940 | - visible: priv.ensureWindow || target.maximizedVertically || target.maximizedRight || |
941 | + visible: root.enabled || target.maximizedVertically || target.maximizedRight || |
942 | target.maximizedTopRight || target.maximizedBottomRight |
943 | - resizeTarget: priv.resizeArea |
944 | + resizeTarget: root.resizeArea |
945 | } |
946 | } |
947 | } |
948 | |
949 | === modified file 'qml/Stage/WindowDecoration.qml' |
950 | --- qml/Stage/WindowDecoration.qml 2016-12-12 11:16:47 +0000 |
951 | +++ qml/Stage/WindowDecoration.qml 2017-01-19 15:00:39 +0000 |
952 | @@ -28,6 +28,7 @@ |
953 | property alias closeButtonVisible: buttons.closeButtonShown |
954 | property alias title: titleLabel.text |
955 | property alias maximizeButtonShown: buttons.maximizeButtonShown |
956 | + property alias minimizeButtonVisible: buttons.minimizeButtonVisible |
957 | property bool active: false |
958 | property alias overlayShown: buttons.overlayShown |
959 | property var menu: undefined |
960 | @@ -38,6 +39,10 @@ |
961 | acceptedButtons: Qt.AllButtons // prevent leaking unhandled mouse events |
962 | hoverEnabled: true |
963 | |
964 | + drag.target: Item {} |
965 | + drag.filterChildren: true |
966 | + drag.threshold: 0 |
967 | + |
968 | signal closeClicked() |
969 | signal minimizeClicked() |
970 | signal maximizeClicked() |
971 | @@ -64,8 +69,8 @@ |
972 | (menuBar.showRequested || root.containsMouse) |
973 | } |
974 | |
975 | - // We dont want touch events to fall through to parent, |
976 | - // otherwise the containsMouse will not work. |
977 | + // We dont want touch events to fall through to parent as it expect some child MouseArea to have them |
978 | + // If not some MouseArea in the menu bar, it will be this one. |
979 | MouseArea { |
980 | anchors.fill: parent |
981 | propagateComposedEvents: true |
982 | |
983 | === modified file 'qml/Stage/WindowResizeArea.qml' |
984 | --- qml/Stage/WindowResizeArea.qml 2016-12-12 16:45:09 +0000 |
985 | +++ qml/Stage/WindowResizeArea.qml 2017-01-19 15:00:39 +0000 |
986 | @@ -32,7 +32,7 @@ |
987 | // The area will anchor to it and manage resize events |
988 | property Item target: null |
989 | property int borderThickness: 0 |
990 | - property real minimumY: -100000000 // By default, impose no limit |
991 | + property Item boundsItem |
992 | property int minWidth: 0 |
993 | property int minHeight: 0 |
994 | |
995 | @@ -243,7 +243,8 @@ |
996 | } |
997 | |
998 | if (d.topBorder) { |
999 | - var newTargetY = Math.max(d.startY + deltaY, root.minimumY); |
1000 | + var bounds = boundsItem.mapToItem(target.parent, 0, 0, boundsItem.width, boundsItem.height); |
1001 | + var newTargetY = Math.max(d.startY + deltaY, bounds.y); |
1002 | var bottomBorderY = target.windowedY + target.height; |
1003 | if (bottomBorderY > newTargetY + d.minimumHeight) { |
1004 | if (bottomBorderY < newTargetY + d.maximumHeight) { |
1005 | |
1006 | === modified file 'tests/mocks/Unity/Application/ApplicationInfo.cpp' |
1007 | --- tests/mocks/Unity/Application/ApplicationInfo.cpp 2016-12-20 15:50:41 +0000 |
1008 | +++ tests/mocks/Unity/Application/ApplicationInfo.cpp 2017-01-19 15:00:39 +0000 |
1009 | @@ -94,6 +94,7 @@ |
1010 | auto surface = surfaceManager->createSurface(QString("prompt foo"), |
1011 | Mir::NormalType, |
1012 | Mir::RestoredState, |
1013 | + nullptr, /* parentSurface */ |
1014 | screenshotUrl); |
1015 | surfaceManager->notifySurfaceCreated(surface); |
1016 | |
1017 | @@ -122,7 +123,9 @@ |
1018 | auto surface = surfaceManager->createSurface(surfaceName, |
1019 | Mir::NormalType, |
1020 | fullscreen() ? Mir::FullscreenState : Mir::RestoredState, |
1021 | - m_screenshotFileName); |
1022 | + nullptr, /* parentSurface */ |
1023 | + m_screenshotFileName, |
1024 | + m_qmlFilePath); |
1025 | |
1026 | surface->setShellChrome(m_shellChrome); |
1027 | |
1028 | @@ -201,6 +204,11 @@ |
1029 | } |
1030 | } |
1031 | |
1032 | +void ApplicationInfo::setQmlFilename(const QString &qmlFilename) |
1033 | +{ |
1034 | + m_qmlFilePath = QString("qrc:///Unity/Application/%1").arg(qmlFilename); |
1035 | +} |
1036 | + |
1037 | void ApplicationInfo::setName(const QString &value) |
1038 | { |
1039 | if (value != m_name) { |
1040 | |
1041 | === modified file 'tests/mocks/Unity/Application/ApplicationInfo.h' |
1042 | --- tests/mocks/Unity/Application/ApplicationInfo.h 2016-12-23 11:05:09 +0000 |
1043 | +++ tests/mocks/Unity/Application/ApplicationInfo.h 2017-01-19 15:00:39 +0000 |
1044 | @@ -29,6 +29,7 @@ |
1045 | |
1046 | #include <QList> |
1047 | #include <QTimer> |
1048 | +#include <QUrl> |
1049 | |
1050 | using namespace unity::shell::application; |
1051 | |
1052 | @@ -58,6 +59,7 @@ |
1053 | |
1054 | void setIconId(const QString &iconId); |
1055 | void setScreenshotId(const QString &screenshotId); |
1056 | + void setQmlFilename(const QString &); |
1057 | |
1058 | void setAppId(const QString &value) { m_appId = value; } |
1059 | QString appId() const override { return m_appId; } |
1060 | @@ -152,6 +154,7 @@ |
1061 | QList<MirSurface*> m_closingSurfaces; |
1062 | bool m_manualSurfaceCreation{false}; |
1063 | Mir::ShellChrome m_shellChrome{Mir::NormalChrome}; |
1064 | + QUrl m_qmlFilePath; |
1065 | }; |
1066 | |
1067 | Q_DECLARE_METATYPE(ApplicationInfo*) |
1068 | |
1069 | === modified file 'tests/mocks/Unity/Application/ApplicationManager.cpp' |
1070 | --- tests/mocks/Unity/Application/ApplicationManager.cpp 2016-12-07 11:19:17 +0000 |
1071 | +++ tests/mocks/Unity/Application/ApplicationManager.cpp 2017-01-19 15:00:39 +0000 |
1072 | @@ -480,6 +480,15 @@ |
1073 | application->setName("Primary Oriented"); |
1074 | application->setSupportedOrientations(Qt::PrimaryOrientation); |
1075 | m_availableApplications.append(application); |
1076 | + |
1077 | + application = new ApplicationInfo(this); |
1078 | + application->setAppId("kate"); |
1079 | + application->setName("Kate"); |
1080 | + application->setIconId("libreoffice"); |
1081 | + application->setScreenshotId("libreoffice"); |
1082 | + application->setQmlFilename("Kate.qml"); |
1083 | + application->setIsTouchApp(false); |
1084 | + m_availableApplications.append(application); |
1085 | } |
1086 | |
1087 | |
1088 | |
1089 | === modified file 'tests/mocks/Unity/Application/MirSurface.cpp' |
1090 | --- tests/mocks/Unity/Application/MirSurface.cpp 2016-12-02 18:15:36 +0000 |
1091 | +++ tests/mocks/Unity/Application/MirSurface.cpp 2017-01-19 15:00:39 +0000 |
1092 | @@ -74,6 +74,7 @@ |
1093 | MirSurface::MirSurface(const QString& name, |
1094 | Mir::Type type, |
1095 | Mir::State state, |
1096 | + MirSurface *parentSurface, |
1097 | const QUrl& screenshot, |
1098 | const QUrl &qmlFilePath) |
1099 | : unity::shell::application::MirSurfaceInterface(nullptr) |
1100 | @@ -90,6 +91,8 @@ |
1101 | , m_height(-1) |
1102 | , m_slowToResize(false) |
1103 | , m_shellChrome(Mir::NormalChrome) |
1104 | + , m_parentSurface(parentSurface) |
1105 | + , m_childSurfaceList(new MirSurfaceListModel(this)) |
1106 | { |
1107 | DEBUG_MSG("state=" << stateToStr(state)); |
1108 | |
1109 | @@ -493,6 +496,36 @@ |
1110 | } |
1111 | } |
1112 | |
1113 | +void MirSurface::openMenu(qreal x, qreal y, qreal width, qreal height) |
1114 | +{ |
1115 | + auto *menu = SurfaceManager::instance()->createSurface("menu", Mir::MenuType, Mir::HiddenState, |
1116 | + this /* parentSurface */, |
1117 | + QUrl() /* screenshot */, |
1118 | + QUrl("qrc:///Unity/Application/KateMenu.qml")); |
1119 | + |
1120 | + menu->setRequestedPosition(QPoint(x,y)); |
1121 | + menu->resize(width, height); |
1122 | + menu->requestState(Mir::RestoredState); |
1123 | + |
1124 | + SurfaceManager::instance()->notifySurfaceCreated(menu); |
1125 | +} |
1126 | + |
1127 | +void MirSurface::openDialog(qreal x, qreal y, qreal width, qreal height) |
1128 | +{ |
1129 | + auto *dialog = SurfaceManager::instance()->createSurface("dialog", Mir::DialogType, Mir::HiddenState, |
1130 | + this /* parentSurface */, |
1131 | + QUrl() /* screenshot */, |
1132 | + QUrl("qrc:///Unity/Application/KateDialog.qml")); |
1133 | + |
1134 | + dialog->setRequestedPosition(QPoint(x,y)); |
1135 | + dialog->resize(width, height); |
1136 | + dialog->requestState(Mir::RestoredState); |
1137 | + |
1138 | + SurfaceManager::instance()->notifySurfaceCreated(dialog); |
1139 | + |
1140 | + dialog->requestFocus(); |
1141 | +} |
1142 | + |
1143 | void MirSurface::setRequestedPosition(const QPoint &value) |
1144 | { |
1145 | if (value != m_requestedPosition) { |
1146 | @@ -505,3 +538,13 @@ |
1147 | Q_EMIT positionChanged(m_position); |
1148 | } |
1149 | } |
1150 | + |
1151 | +MirSurfaceInterface* MirSurface::parentSurface() const |
1152 | +{ |
1153 | + return m_parentSurface; |
1154 | +} |
1155 | + |
1156 | +MirSurfaceListInterface* MirSurface::childSurfaceList() const |
1157 | +{ |
1158 | + return m_childSurfaceList; |
1159 | +} |
1160 | |
1161 | === modified file 'tests/mocks/Unity/Application/MirSurface.h' |
1162 | --- tests/mocks/Unity/Application/MirSurface.h 2016-12-03 18:41:45 +0000 |
1163 | +++ tests/mocks/Unity/Application/MirSurface.h 2017-01-19 15:00:39 +0000 |
1164 | @@ -45,6 +45,7 @@ |
1165 | MirSurface(const QString& name, |
1166 | Mir::Type type, |
1167 | Mir::State state, |
1168 | + MirSurface *parentSurface, |
1169 | const QUrl& screenshot, |
1170 | const QUrl &qmlFilePath = QUrl()); |
1171 | virtual ~MirSurface(); |
1172 | @@ -94,6 +95,9 @@ |
1173 | QPoint requestedPosition() const override { return m_requestedPosition; } |
1174 | void setRequestedPosition(const QPoint &) override; |
1175 | |
1176 | + unity::shell::application::MirSurfaceInterface* parentSurface() const override; |
1177 | + unity::shell::application::MirSurfaceListInterface* childSurfaceList() const override; |
1178 | + |
1179 | Q_INVOKABLE void close() override; |
1180 | Q_INVOKABLE void activate() override; |
1181 | |
1182 | @@ -121,6 +125,9 @@ |
1183 | |
1184 | Q_INVOKABLE virtual void setInputBounds(const QRect &boundsRect); |
1185 | |
1186 | + Q_INVOKABLE void openMenu(qreal x, qreal y, qreal width, qreal height); |
1187 | + Q_INVOKABLE void openDialog(qreal x, qreal y, qreal width, qreal height); |
1188 | + |
1189 | ///// |
1190 | // internal mock stuff |
1191 | |
1192 | @@ -216,6 +223,10 @@ |
1193 | |
1194 | QPoint m_position; |
1195 | QPoint m_requestedPosition; |
1196 | + |
1197 | + unity::shell::application::MirSurfaceInterface* m_parentSurface; |
1198 | + |
1199 | + MirSurfaceListModel *m_childSurfaceList; |
1200 | }; |
1201 | |
1202 | #endif // MOCK_MIR_SURFACE_H |
1203 | |
1204 | === modified file 'tests/mocks/Unity/Application/MirSurfaceItem.cpp' |
1205 | --- tests/mocks/Unity/Application/MirSurfaceItem.cpp 2016-12-23 11:05:09 +0000 |
1206 | +++ tests/mocks/Unity/Application/MirSurfaceItem.cpp 2017-01-19 15:00:39 +0000 |
1207 | @@ -159,7 +159,9 @@ |
1208 | |
1209 | if (m_qmlItem) { |
1210 | QQmlProperty orientationProp(m_qmlItem, "orientationAngle"); |
1211 | - orientationProp.write(QVariant::fromValue(orientationAngle())); |
1212 | + if (orientationProp.isValid()) { |
1213 | + orientationProp.write(QVariant::fromValue(orientationAngle())); |
1214 | + } |
1215 | } |
1216 | } |
1217 | |
1218 | @@ -167,7 +169,9 @@ |
1219 | { |
1220 | if (m_qmlItem) { |
1221 | QQmlProperty screenshotSource(m_qmlItem, "screenshotSource"); |
1222 | - screenshotSource.write(QVariant::fromValue(screenshotUrl)); |
1223 | + if (screenshotSource.isValid()) { |
1224 | + screenshotSource.write(QVariant::fromValue(screenshotUrl)); |
1225 | + } |
1226 | } |
1227 | } |
1228 | |
1229 | @@ -193,12 +197,23 @@ |
1230 | |
1231 | { |
1232 | QQmlProperty screenshotSource(m_qmlItem, "screenshotSource"); |
1233 | - screenshotSource.write(QVariant::fromValue(m_qmlSurface->screenshotUrl())); |
1234 | + if (screenshotSource.isValid()) { |
1235 | + screenshotSource.write(QVariant::fromValue(m_qmlSurface->screenshotUrl())); |
1236 | + } |
1237 | } |
1238 | |
1239 | { |
1240 | QQmlProperty orientationProp(m_qmlItem, "orientationAngle"); |
1241 | - orientationProp.write(QVariant::fromValue(orientationAngle())); |
1242 | + if (orientationProp.isValid()) { |
1243 | + orientationProp.write(QVariant::fromValue(orientationAngle())); |
1244 | + } |
1245 | + } |
1246 | + |
1247 | + { |
1248 | + QQmlProperty surfaceProperty(m_qmlItem, "surface"); |
1249 | + if (surfaceProperty.isValid()) { |
1250 | + surfaceProperty.write(QVariant::fromValue(m_qmlSurface)); |
1251 | + } |
1252 | } |
1253 | } |
1254 | |
1255 | |
1256 | === modified file 'tests/mocks/Unity/Application/MirSurfaceListModel.h' |
1257 | --- tests/mocks/Unity/Application/MirSurfaceListModel.h 2016-11-30 19:24:02 +0000 |
1258 | +++ tests/mocks/Unity/Application/MirSurfaceListModel.h 2017-01-19 15:00:39 +0000 |
1259 | @@ -44,7 +44,6 @@ |
1260 | bool contains(MirSurface *surface) const { return m_surfaceList.contains(surface); } |
1261 | |
1262 | private: |
1263 | - void appendSurface(MirSurface *surface); |
1264 | void raise(MirSurface *surface); |
1265 | void moveSurface(int from, int to); |
1266 | void connectSurface(MirSurface *surface); |
1267 | |
1268 | === modified file 'tests/mocks/Unity/Application/SurfaceManager.cpp' |
1269 | --- tests/mocks/Unity/Application/SurfaceManager.cpp 2017-01-03 12:45:42 +0000 |
1270 | +++ tests/mocks/Unity/Application/SurfaceManager.cpp 2017-01-19 15:00:39 +0000 |
1271 | @@ -61,10 +61,15 @@ |
1272 | MirSurface *SurfaceManager::createSurface(const QString& name, |
1273 | Mir::Type type, |
1274 | Mir::State state, |
1275 | - const QUrl& screenshot) |
1276 | + MirSurface *parentSurface, |
1277 | + const QUrl &screenshot, |
1278 | + const QUrl &qmlFilePath) |
1279 | { |
1280 | - MirSurface* surface = new MirSurface(name, type, state, screenshot); |
1281 | + MirSurface* surface = new MirSurface(name, type, state, parentSurface, screenshot, qmlFilePath); |
1282 | registerSurface(surface); |
1283 | + if (parentSurface) { |
1284 | + static_cast<MirSurfaceListModel*>(parentSurface->childSurfaceList())->addSurface(surface); |
1285 | + } |
1286 | return surface; |
1287 | } |
1288 | |
1289 | @@ -72,12 +77,14 @@ |
1290 | { |
1291 | m_surfaces.prepend(surface); |
1292 | |
1293 | - surface->setMinimumWidth(m_newSurfaceMinimumWidth); |
1294 | - surface->setMaximumWidth(m_newSurfaceMaximumWidth); |
1295 | - surface->setMinimumHeight(m_newSurfaceMinimumHeight); |
1296 | - surface->setMaximumHeight(m_newSurfaceMaximumHeight); |
1297 | - surface->setWidthIncrement(m_newSurfaceWidthIncrement); |
1298 | - surface->setHeightIncrement(m_newSurfaceHeightIncrement); |
1299 | + if (!surface->parentSurface()) { |
1300 | + surface->setMinimumWidth(m_newSurfaceMinimumWidth); |
1301 | + surface->setMaximumWidth(m_newSurfaceMaximumWidth); |
1302 | + surface->setMinimumHeight(m_newSurfaceMinimumHeight); |
1303 | + surface->setMaximumHeight(m_newSurfaceMaximumHeight); |
1304 | + surface->setWidthIncrement(m_newSurfaceWidthIncrement); |
1305 | + surface->setHeightIncrement(m_newSurfaceHeightIncrement); |
1306 | + } |
1307 | |
1308 | connect(surface, &MirSurface::stateRequested, this, [=](Mir::State state) { |
1309 | this->onStateRequested(surface, state); |
1310 | |
1311 | === modified file 'tests/mocks/Unity/Application/SurfaceManager.h' |
1312 | --- tests/mocks/Unity/Application/SurfaceManager.h 2017-01-03 12:45:42 +0000 |
1313 | +++ tests/mocks/Unity/Application/SurfaceManager.h 2017-01-19 15:00:39 +0000 |
1314 | @@ -49,7 +49,9 @@ |
1315 | Q_INVOKABLE MirSurface* createSurface(const QString& name, |
1316 | Mir::Type type, |
1317 | Mir::State state, |
1318 | - const QUrl& screenshot); |
1319 | + MirSurface *parentSurface, |
1320 | + const QUrl &screenshot, |
1321 | + const QUrl &qmlFilePath = QUrl()); |
1322 | |
1323 | |
1324 | void notifySurfaceCreated(unity::shell::application::MirSurfaceInterface *); |
1325 | |
1326 | === modified file 'tests/mocks/Unity/Application/VirtualKeyboard.cpp' |
1327 | --- tests/mocks/Unity/Application/VirtualKeyboard.cpp 2016-09-26 12:25:19 +0000 |
1328 | +++ tests/mocks/Unity/Application/VirtualKeyboard.cpp 2017-01-19 15:00:39 +0000 |
1329 | @@ -24,10 +24,11 @@ |
1330 | |
1331 | VirtualKeyboard::VirtualKeyboard() |
1332 | : MirSurface("input-method", |
1333 | - Mir::InputMethodType, |
1334 | - Mir::MinimizedState, |
1335 | - QUrl("qrc:///Unity/Application/vkb_portrait.png"), |
1336 | - QUrl("qrc:///Unity/Application/VirtualKeyboard.qml")) |
1337 | + Mir::InputMethodType, |
1338 | + Mir::MinimizedState, |
1339 | + nullptr, /* parentSurface */ |
1340 | + QUrl("qrc:///Unity/Application/vkb_portrait.png"), |
1341 | + QUrl("qrc:///Unity/Application/VirtualKeyboard.qml")) |
1342 | { |
1343 | } |
1344 | |
1345 | |
1346 | === added file 'tests/mocks/Unity/Application/resources/Kate.qml' |
1347 | --- tests/mocks/Unity/Application/resources/Kate.qml 1970-01-01 00:00:00 +0000 |
1348 | +++ tests/mocks/Unity/Application/resources/Kate.qml 2017-01-19 15:00:39 +0000 |
1349 | @@ -0,0 +1,49 @@ |
1350 | +/* |
1351 | + * Copyright (C) 2016 Canonical, Ltd. |
1352 | + * |
1353 | + * This program is free software; you can redistribute it and/or modify |
1354 | + * it under the terms of the GNU General Public License as published by |
1355 | + * the Free Software Foundation; version 3. |
1356 | + * |
1357 | + * This program is distributed in the hope that it will be useful, |
1358 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1359 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1360 | + * GNU General Public License for more details. |
1361 | + * |
1362 | + * You should have received a copy of the GNU General Public License |
1363 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1364 | + */ |
1365 | + |
1366 | +import QtQuick 2.4 |
1367 | +import Ubuntu.Components 1.3 |
1368 | + |
1369 | +Rectangle { |
1370 | + id: root |
1371 | + color: "white" |
1372 | + implicitWidth: width |
1373 | + implicitHeight: height |
1374 | + |
1375 | + property var surface |
1376 | + |
1377 | + Column { |
1378 | + Button { |
1379 | + text: "Open Menu" |
1380 | + property real nextY: y |
1381 | + property real menuHeight: units.gu(5) |
1382 | + onClicked: { |
1383 | + surface.openMenu(x+width, nextY, units.gu(10), menuHeight); |
1384 | + nextY += menuHeight + units.gu(.5) |
1385 | + } |
1386 | + } |
1387 | + |
1388 | + Button { |
1389 | + text: "Open Dialog" |
1390 | + property real dialogWidth: units.gu(30) |
1391 | + property real dialogHeight: units.gu(20) |
1392 | + onClicked: { |
1393 | + surface.openDialog(root.x+(root.width/2)-(dialogWidth/2), root.y+(root.height/2)-(dialogHeight/2), |
1394 | + dialogWidth, dialogHeight); |
1395 | + } |
1396 | + } |
1397 | + } |
1398 | +} |
1399 | |
1400 | === added file 'tests/mocks/Unity/Application/resources/KateDialog.qml' |
1401 | --- tests/mocks/Unity/Application/resources/KateDialog.qml 1970-01-01 00:00:00 +0000 |
1402 | +++ tests/mocks/Unity/Application/resources/KateDialog.qml 2017-01-19 15:00:39 +0000 |
1403 | @@ -0,0 +1,48 @@ |
1404 | +/* |
1405 | + * Copyright (C) 2016 Canonical, Ltd. |
1406 | + * |
1407 | + * This program is free software; you can redistribute it and/or modify |
1408 | + * it under the terms of the GNU General Public License as published by |
1409 | + * the Free Software Foundation; version 3. |
1410 | + * |
1411 | + * This program is distributed in the hope that it will be useful, |
1412 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1413 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1414 | + * GNU General Public License for more details. |
1415 | + * |
1416 | + * You should have received a copy of the GNU General Public License |
1417 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1418 | + */ |
1419 | + |
1420 | +import QtQuick 2.4 |
1421 | +import Ubuntu.Components 1.3 |
1422 | + |
1423 | +Rectangle { |
1424 | + id: root |
1425 | + color: "grey" |
1426 | + implicitWidth: width |
1427 | + implicitHeight: height |
1428 | + |
1429 | + property var surface |
1430 | + |
1431 | + Text { |
1432 | + anchors.left: parent.left |
1433 | + anchors.right: parent.right |
1434 | + horizontalAlignment: Text.AlignHCenter |
1435 | + verticalAlignment: Text.AlignVCenter |
1436 | + text: "This is a child dialog." |
1437 | + } |
1438 | + |
1439 | + Row { |
1440 | + anchors.bottom: parent.bottom |
1441 | + anchors.right: parent.right |
1442 | + Button { |
1443 | + text: "OK" |
1444 | + onClicked: root.surface.close() |
1445 | + } |
1446 | + Button { |
1447 | + text: "Cancel" |
1448 | + onClicked: root.surface.close() |
1449 | + } |
1450 | + } |
1451 | +} |
1452 | |
1453 | === added file 'tests/mocks/Unity/Application/resources/KateMenu.qml' |
1454 | --- tests/mocks/Unity/Application/resources/KateMenu.qml 1970-01-01 00:00:00 +0000 |
1455 | +++ tests/mocks/Unity/Application/resources/KateMenu.qml 2017-01-19 15:00:39 +0000 |
1456 | @@ -0,0 +1,41 @@ |
1457 | +/* |
1458 | + * Copyright (C) 2016 Canonical, Ltd. |
1459 | + * |
1460 | + * This program is free software; you can redistribute it and/or modify |
1461 | + * it under the terms of the GNU General Public License as published by |
1462 | + * the Free Software Foundation; version 3. |
1463 | + * |
1464 | + * This program is distributed in the hope that it will be useful, |
1465 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1466 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1467 | + * GNU General Public License for more details. |
1468 | + * |
1469 | + * You should have received a copy of the GNU General Public License |
1470 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1471 | + */ |
1472 | + |
1473 | +import QtQuick 2.4 |
1474 | +import Ubuntu.Components 1.3 |
1475 | + |
1476 | +Rectangle { |
1477 | + id: root |
1478 | + color: "grey" |
1479 | + implicitWidth: width |
1480 | + implicitHeight: height |
1481 | + |
1482 | + property var surface |
1483 | + |
1484 | + Text { |
1485 | + anchors.centerIn: parent |
1486 | + text: "menu" |
1487 | + } |
1488 | + MouseArea { |
1489 | + anchors.fill: parent |
1490 | + property real nextY: 0 |
1491 | + onClicked: { |
1492 | + // ensure some overlap with is parent in order to visually check for nested opacity artifacts |
1493 | + root.surface.openMenu(x+(width*0.6), nextY, units.gu(10), root.height); |
1494 | + nextY += root.height |
1495 | + } |
1496 | + } |
1497 | +} |
1498 | |
1499 | === modified file 'tests/mocks/Unity/Application/resources/surfaces.qrc' |
1500 | --- tests/mocks/Unity/Application/resources/surfaces.qrc 2015-11-05 17:59:16 +0000 |
1501 | +++ tests/mocks/Unity/Application/resources/surfaces.qrc 2017-01-19 15:00:39 +0000 |
1502 | @@ -1,5 +1,8 @@ |
1503 | <RCC> |
1504 | <qresource prefix="/Unity/Application"> |
1505 | + <file>Kate.qml</file> |
1506 | + <file>KateDialog.qml</file> |
1507 | + <file>KateMenu.qml</file> |
1508 | <file>VirtualKeyboard.qml</file> |
1509 | <file>MirSurfaceItem.qml</file> |
1510 | <file>vkb_portrait.png</file> |
1511 | |
1512 | === modified file 'tests/qmltests/Stage/ApplicationCheckBox.qml' |
1513 | --- tests/qmltests/Stage/ApplicationCheckBox.qml 2016-11-30 19:24:02 +0000 |
1514 | +++ tests/qmltests/Stage/ApplicationCheckBox.qml 2017-01-19 15:00:39 +0000 |
1515 | @@ -162,7 +162,7 @@ |
1516 | } |
1517 | } |
1518 | |
1519 | - // Rows of application surfaces |
1520 | + // Rows of top-level application surfaces |
1521 | Repeater { |
1522 | model: d.application ? d.application.surfaceList : null |
1523 | RowLayout { |
1524 | |
1525 | === modified file 'tests/qmltests/Stage/tst_WindowResizeArea.qml' |
1526 | --- tests/qmltests/Stage/tst_WindowResizeArea.qml 2016-12-21 16:20:58 +0000 |
1527 | +++ tests/qmltests/Stage/tst_WindowResizeArea.qml 2017-01-19 15:00:39 +0000 |
1528 | @@ -90,6 +90,7 @@ |
1529 | id: windowResizeArea |
1530 | anchors.fill: parent |
1531 | target: fakeWindow |
1532 | + boundsItem: bounds |
1533 | borderThickness: units.gu(2) |
1534 | minWidth: units.gu(15) |
1535 | minHeight: units.gu(10) |
1536 | @@ -121,7 +122,16 @@ |
1537 | active: windowLoaderCheckbox.checked |
1538 | } |
1539 | |
1540 | + Item { |
1541 | + id: bounds |
1542 | + anchors.left: parent.left |
1543 | + anchors.top: parent.top |
1544 | + anchors.right: controls.left |
1545 | + anchors.bottom: parent.bottom |
1546 | + } |
1547 | + |
1548 | Rectangle { |
1549 | + id: controls |
1550 | anchors.right: parent.right |
1551 | anchors.top: parent.top |
1552 | anchors.bottom: parent.bottom |
FAILED: Continuous integration, rev:2707 /unity8- jenkins. ubuntu. com/job/ lp-unity8- ci/2587/ /unity8- jenkins. ubuntu. com/job/ build/3402/ console /unity8- jenkins. ubuntu. com/job/ build-0- fetch/3430 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 3281/console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 3281/console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= zesty/3281/ console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 3281/console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 3281/console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= zesty/3281/ console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 3281/console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 3281/console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= zesty/3281/ console
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild: /unity8- jenkins. ubuntu. com/job/ lp-unity8- ci/2587/ rebuild
https:/