Merge lp:~mzanetti/unity8/fix-resize-bug into lp:unity8

Proposed by Michael Zanetti
Status: Rejected
Rejected by: Michael Zanetti
Proposed branch: lp:~mzanetti/unity8/fix-resize-bug
Merge into: lp:unity8
Prerequisite: lp:~mzanetti/unity8/unified-stages
Diff against target: 22 lines (+6/-6)
1 file modified
qml/Stage/WindowResizeArea.qml (+6/-6)
To merge this branch: bzr merge lp:~mzanetti/unity8/fix-resize-bug
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Needs Fixing
Lukáš Tinkl (community) Needs Fixing
Review via email: mp+308235@code.launchpad.net

This proposal supersedes a proposal from 2016-10-12.

Commit message

don't make windowedX/Y/W/H a binding... it will have some weird effects

windowedX/Y/W/H values are usually written by imperative code, this
binding only works as long as the user doesn't move the window
manually anyways. In addition, it introduces some bug with resizing
before any move operation happened.

Description of the change

 * Are there any related MPs required for this MP to build/function as expected? Please list.

see prereq

 * Did you perform an exploratory manual test run of your code change and any related functionality?

yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

no

 * If you changed the UI, has there been a design review?

no

To post a comment you must log in.
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

We'll need something better; this way, on an external screen, the windows are tiny on startup, then they very often grow to a size that overflows the screen. Edges are not visible, thus you can't resize them back to normal.

review: Needs Fixing
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2605
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2360/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3113
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1757
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1757
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1757
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3141
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2997
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2997/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2997
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2997/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2997
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2997/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2997
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2997/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2997
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2997/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2997
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2997/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2997
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2997/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2997
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2997/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2997
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2997/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

@Daniel, how would mirAL impact this? I suppose you'd remove those bindings anyways?

Revision history for this message
Daniel d'Andrada (dandrader) wrote : Posted in a previous version of this proposal

Looks like you forgot to specify the prerequisite of this branch

Revision history for this message
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal

which is why there is a superseding MP :)

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

This won't affect mirAL changes.

But these were made as bindings to fix a bug (they were originally simple assignments as you're doing now). bzr history should tell what exactly is the bug these bindings are fixing.

Unmerged revisions

2605. By Michael Zanetti

don't make windowedX/Y/W/H a binding... it will have some weird effects

windowedX/Y/W/H values are usually written by imperative code, this
binding only works as long as the user doesn't move the window
manually anyways. In addition, it introduces some bug with resizing
before any move operation happened.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Stage/WindowResizeArea.qml'
2--- qml/Stage/WindowResizeArea.qml 2016-10-12 10:06:28 +0000
3+++ qml/Stage/WindowResizeArea.qml 2016-10-12 10:06:30 +0000
4@@ -78,12 +78,12 @@
5 Qt.rect(target.windowedX, target.windowedY, defaultWidth, defaultHeight));
6
7
8- target.windowedWidth = Qt.binding(function() { return Math.min(Math.max(windowGeometry.width, d.minimumWidth), screenWidth - root.leftMargin); });
9- target.windowedHeight = Qt.binding(function() { return Math.min(Math.max(windowGeometry.height, d.minimumHeight),
10- root.screenHeight - (target.fullscreen ? 0 : PanelState.panelHeight)); });
11- target.windowedX = Qt.binding(function() { return Math.max(Math.min(windowGeometry.x, root.screenWidth - root.leftMargin - target.windowedWidth),
12- (target.fullscreen ? 0 : root.leftMargin)); });
13- target.windowedY = Qt.binding(function() { return Math.max(Math.min(windowGeometry.y, root.screenHeight - target.windowedHeight), PanelState.panelHeight); });
14+ target.windowedWidth = Math.min(Math.max(windowGeometry.width, d.minimumWidth), screenWidth - root.leftMargin);
15+ target.windowedHeight = Math.min(Math.max(windowGeometry.height, d.minimumHeight),
16+ root.screenHeight - (target.fullscreen ? 0 : PanelState.panelHeight));
17+ target.windowedX = Math.max(Math.min(windowGeometry.x, root.screenWidth - root.leftMargin - target.windowedWidth),
18+ (target.fullscreen ? 0 : root.leftMargin));
19+ target.windowedY = Math.max(Math.min(windowGeometry.y, root.screenHeight - target.windowedHeight), PanelState.panelHeight);
20
21 var windowState = windowStateStorage.getState(root.windowId, WindowStateStorage.WindowStateNormal)
22 target.restore(false /* animated */, windowState);

Subscribers

People subscribed via source and target branches