Merge lp:~nick-dedekind/qtubuntu/1616968-position-shift into lp:qtubuntu

Proposed by Nick Dedekind
Status: Merged
Approved by: Daniel d'Andrada
Approved revision: 339
Merged at revision: 339
Proposed branch: lp:~nick-dedekind/qtubuntu/1616968-position-shift
Merge into: lp:qtubuntu
Diff against target: 57 lines (+9/-7)
1 file modified
src/ubuntumirclient/window.cpp (+9/-7)
To merge this branch: bzr merge lp:~nick-dedekind/qtubuntu/1616968-position-shift
Reviewer Review Type Date Requested Status
Daniel d'Andrada (community) Approve
Unity8 CI Bot continuous-integration Approve
Review via email: mp+304070@code.launchpad.net

Commit message

Fixed panel position shifting and initial surface exposure.

Description of the change

Fixed panel position shifting and initial surface exposure.

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

PASSED: Continuous integration, rev:339
https://unity8-jenkins.ubuntu.com/job/lp-qtubuntu-ci/111/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2683
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2711
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2584
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2584
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2584
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2577
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2577/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2577
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2577/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2577
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2577/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2577
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2577/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2577
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2577/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2577
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2577/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2577
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2577/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2577
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2577/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2577
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2577/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Looks good to me.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/ubuntumirclient/window.cpp'
2--- src/ubuntumirclient/window.cpp 2016-08-09 23:00:32 +0000
3+++ src/ubuntumirclient/window.cpp 2016-08-26 13:19:15 +0000
4@@ -347,9 +347,9 @@
5 geom.setWidth(parameters.width);
6 geom.setHeight(parameters.height);
7 if (mWindow->windowState() == Qt::WindowFullScreen) {
8- geom.setY(0);
9+ geom.moveTop(0);
10 } else {
11- geom.setY(panelHeight());
12+ geom.moveTop(panelHeight());
13 }
14
15 // Assume that the buffer size matches the surface size at creation time
16@@ -584,16 +584,17 @@
17 , mWindowState(w->windowState())
18 , mWindowFlags(w->flags())
19 , mWindowVisible(false)
20- , mWindowExposed(true)
21 , mNativeInterface(native)
22 , mSurface(new UbuntuSurface{this, eglDisplay, input, mirConnection})
23 , mScale(1.0)
24 , mFormFactor(mir_form_factor_unknown)
25 {
26+ mWindowExposed = mSurface->mNeedsExposeCatchup == false;
27+
28 qCDebug(ubuntumirclient, "UbuntuWindow(window=%p, screen=%p, input=%p, surf=%p) with title '%s', role: '%d'",
29 w, w->screen()->handle(), input, mSurface.get(), qPrintable(window()->title()), roleFor(window()));
30
31- updatePanelHeightHack(w->windowState() != Qt::WindowFullScreen);
32+ updatePanelHeightHack(mSurface->state() != mir_surface_state_fullscreen);
33 }
34
35 UbuntuWindow::~UbuntuWindow()
36@@ -703,9 +704,9 @@
37
38 QRect newGeometry = geometry();
39 if (enable) {
40- newGeometry.setY(panelHeight());
41+ newGeometry.moveTop(panelHeight());
42 } else {
43- newGeometry.setY(0);
44+ newGeometry.moveTop(0);
45 }
46
47 if (newGeometry != geometry()) {
48@@ -772,7 +773,8 @@
49
50 bool UbuntuWindow::isExposed() const
51 {
52- return mWindowVisible && mWindowExposed;
53+ // mNeedsExposeCatchup because we need to render a frame to get the expose surface event from mir.
54+ return mWindowVisible && (mWindowExposed || (mSurface && mSurface->mNeedsExposeCatchup));
55 }
56
57 QSurfaceFormat UbuntuWindow::format() const

Subscribers

People subscribed via source and target branches