Merge lp:~unity-team/unity8/fixTinyWindows into lp:unity8

Proposed by Michał Sawicz on 2016-02-25
Status: Merged
Approved by: Albert Astals Cid on 2016-03-02
Approved revision: 2092
Merged at revision: 2234
Proposed branch: lp:~unity-team/unity8/fixTinyWindows
Merge into: lp:unity8
Prerequisite: lp:~mzanetti/unity8/launcher-sizing
Diff against target: 32 lines (+7/-4)
2 files modified
qml/Stages/DesktopStage.qml (+1/-0)
qml/Stages/WindowResizeArea.qml (+6/-4)
To merge this branch: bzr merge lp:~unity-team/unity8/fixTinyWindows
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) 2016-02-25 Approve on 2016-03-02
Unity8 CI Bot continuous-integration 2016-02-25 Approve on 2016-02-29
PS Jenkins bot continuous-integration 2016-02-25 Needs Fixing on 2016-02-25
Review via email: mp+287173@code.launchpad.net

This proposal supersedes a proposal from 2016-02-25.

Commit Message

Fix tiny windows when switching stages

Description of the Change

Fix tiny windows when switching stages

Requires binding on requested dimensions due to screen size being 0 in some cases.

To post a comment you must log in.
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2090
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/490/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/654
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay/217
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial/217
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/677
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/695
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/695
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/691
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/691/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/691
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/691/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/691
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/691/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/691
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/691/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/691
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/691/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/691
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/691/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/490/rebuild

review: Needs Fixing (continuous-integration)
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:2090
http://jenkins.qa.ubuntu.com/job/unity8-ci/7421/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/6639
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/836/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/2126
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/829
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/2021
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/2021
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/828
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/827
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/5041
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6650
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6650/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/27901
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/433/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/834
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/834/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/27900

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/7421/rebuild

review: Needs Fixing (continuous-integration)
Albert Astals Cid (aacid) wrote :

Can we have a test?

review: Needs Fixing
Lukáš Tinkl (lukas-kde) wrote :

This wasn't meant to land separately, I'll add a test in https://code.launchpad.net/~lukas-kde/unity8/windowOpenCloseAnimations/+merge/286414

lp:~unity-team/unity8/fixTinyWindows updated on 2016-02-29
2091. By Lukáš Tinkl on 2016-02-29

fix for fullscreen apps in desktop mode

2092. By Lukáš Tinkl on 2016-02-29

similar fix to height...

Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:2092
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/523/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/688
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay/272
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial/272
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay/273
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/711
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/729
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/729
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/725
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/725/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/725
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/725/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/725
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/725/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/725
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/725/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/725
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/725/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/725
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/725/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/523/rebuild

review: Approve (continuous-integration)
Albert Astals Cid (aacid) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
No, but i've been told it was part of the MWC silo and people found it to work

 * Did CI run pass?
Yes

 * Did you make sure that the branch does not contain spurious tags?
Yes

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Stages/DesktopStage.qml'
2--- qml/Stages/DesktopStage.qml 2016-02-29 13:13:54 +0000
3+++ qml/Stages/DesktopStage.qml 2016-02-29 13:13:54 +0000
4@@ -275,6 +275,7 @@
5 readonly property alias maximizedLeft: appDelegatePrivate.maximizedLeft
6 readonly property alias maximizedRight: appDelegatePrivate.maximizedRight
7 readonly property alias minimized: appDelegatePrivate.minimized
8+ readonly property alias fullscreen: decoratedWindow.fullscreen
9
10 readonly property string appId: model.appId
11 property bool animationsEnabled: true
12
13=== modified file 'qml/Stages/WindowResizeArea.qml'
14--- qml/Stages/WindowResizeArea.qml 2016-02-29 13:13:54 +0000
15+++ qml/Stages/WindowResizeArea.qml 2016-02-29 13:13:54 +0000
16@@ -73,10 +73,12 @@
17 var windowGeometry = windowStateStorage.getGeometry(root.windowId,
18 Qt.rect(target.x, target.y, defaultWidth, defaultHeight));
19
20- target.requestedWidth = Math.min(Math.max(windowGeometry.width, d.minimumWidth), screenWidth - root.leftMargin);
21- target.requestedHeight = Math.min(Math.max(windowGeometry.height, d.minimumHeight), root.screenHeight - PanelState.panelHeight);
22- target.x = Math.max(Math.min(windowGeometry.x, root.screenWidth - root.leftMargin - target.requestedWidth), root.leftMargin)
23- target.y = Math.max(Math.min(windowGeometry.y, root.screenHeight - target.requestedHeight), PanelState.panelHeight)
24+ target.requestedWidth = Qt.binding(function() { return Math.min(Math.max(windowGeometry.width, d.minimumWidth), screenWidth - root.leftMargin); });
25+ target.requestedHeight = Qt.binding(function() { return Math.min(Math.max(windowGeometry.height, d.minimumHeight),
26+ root.screenHeight - (target.fullscreen ? 0 : PanelState.panelHeight)); });
27+ target.x = Qt.binding(function() { return Math.max(Math.min(windowGeometry.x, root.screenWidth - root.leftMargin - target.requestedWidth),
28+ (target.fullscreen ? 0 : root.leftMargin)); });
29+ target.y = Qt.binding(function() { return Math.max(Math.min(windowGeometry.y, root.screenHeight - target.requestedHeight), PanelState.panelHeight); });
30
31 var windowState = windowStateStorage.getState(root.windowId, WindowStateStorage.WindowStateNormal)
32 if (windowState === WindowStateStorage.WindowStateMaximized) {

Subscribers

People subscribed via source and target branches