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
=== modified file 'src/ubuntumirclient/window.cpp'
--- src/ubuntumirclient/window.cpp 2016-08-09 23:00:32 +0000
+++ src/ubuntumirclient/window.cpp 2016-08-26 13:19:15 +0000
@@ -347,9 +347,9 @@
347 geom.setWidth(parameters.width);347 geom.setWidth(parameters.width);
348 geom.setHeight(parameters.height);348 geom.setHeight(parameters.height);
349 if (mWindow->windowState() == Qt::WindowFullScreen) {349 if (mWindow->windowState() == Qt::WindowFullScreen) {
350 geom.setY(0);350 geom.moveTop(0);
351 } else {351 } else {
352 geom.setY(panelHeight());352 geom.moveTop(panelHeight());
353 }353 }
354354
355 // Assume that the buffer size matches the surface size at creation time355 // Assume that the buffer size matches the surface size at creation time
@@ -584,16 +584,17 @@
584 , mWindowState(w->windowState())584 , mWindowState(w->windowState())
585 , mWindowFlags(w->flags())585 , mWindowFlags(w->flags())
586 , mWindowVisible(false)586 , mWindowVisible(false)
587 , mWindowExposed(true)
588 , mNativeInterface(native)587 , mNativeInterface(native)
589 , mSurface(new UbuntuSurface{this, eglDisplay, input, mirConnection})588 , mSurface(new UbuntuSurface{this, eglDisplay, input, mirConnection})
590 , mScale(1.0)589 , mScale(1.0)
591 , mFormFactor(mir_form_factor_unknown)590 , mFormFactor(mir_form_factor_unknown)
592{591{
592 mWindowExposed = mSurface->mNeedsExposeCatchup == false;
593
593 qCDebug(ubuntumirclient, "UbuntuWindow(window=%p, screen=%p, input=%p, surf=%p) with title '%s', role: '%d'",594 qCDebug(ubuntumirclient, "UbuntuWindow(window=%p, screen=%p, input=%p, surf=%p) with title '%s', role: '%d'",
594 w, w->screen()->handle(), input, mSurface.get(), qPrintable(window()->title()), roleFor(window()));595 w, w->screen()->handle(), input, mSurface.get(), qPrintable(window()->title()), roleFor(window()));
595596
596 updatePanelHeightHack(w->windowState() != Qt::WindowFullScreen);597 updatePanelHeightHack(mSurface->state() != mir_surface_state_fullscreen);
597}598}
598599
599UbuntuWindow::~UbuntuWindow()600UbuntuWindow::~UbuntuWindow()
@@ -703,9 +704,9 @@
703704
704 QRect newGeometry = geometry();705 QRect newGeometry = geometry();
705 if (enable) {706 if (enable) {
706 newGeometry.setY(panelHeight());707 newGeometry.moveTop(panelHeight());
707 } else {708 } else {
708 newGeometry.setY(0);709 newGeometry.moveTop(0);
709 }710 }
710711
711 if (newGeometry != geometry()) {712 if (newGeometry != geometry()) {
@@ -772,7 +773,8 @@
772773
773bool UbuntuWindow::isExposed() const774bool UbuntuWindow::isExposed() const
774{775{
775 return mWindowVisible && mWindowExposed;776 // mNeedsExposeCatchup because we need to render a frame to get the expose surface event from mir.
777 return mWindowVisible && (mWindowExposed || (mSurface && mSurface->mNeedsExposeCatchup));
776}778}
777779
778QSurfaceFormat UbuntuWindow::format() const780QSurfaceFormat UbuntuWindow::format() const

Subscribers

People subscribed via source and target branches