Merge lp:~saviq/qtmir/ensure-screen-geometry into lp:qtmir

Proposed by Michał Sawicz
Status: Merged
Approved by: Michał Sawicz
Approved revision: 441
Merged at revision: 458
Proposed branch: lp:~saviq/qtmir/ensure-screen-geometry
Merge into: lp:qtmir
Diff against target: 30 lines (+8/-1)
2 files modified
src/platforms/mirserver/screen.cpp (+7/-0)
src/platforms/mirserver/screenwindow.cpp (+1/-1)
To merge this branch: bzr merge lp:~saviq/qtmir/ensure-screen-geometry
Reviewer Review Type Date Requested Status
Gerry Boland (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Unity8 CI Bot (community) continuous-integration Approve
Review via email: mp+286401@code.launchpad.net

Commit message

Ensure ScreenWindow geometry correctly set and used after moving Screen

NB: this will conflict with lp:~unity-team/qtmir/set-display-config, from which this is a cherry-pick

Description of the change

 * Are there any related MPs required for this MP to build/function as expected? Please list.
N
 * Did you perform an exploratory manual test run of your code change and any related functionality?
Will in silo
 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

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

PASSED: Continuous integration, rev:441
https://unity8-jenkins.ubuntu.com/job/lp-qtmir-1-ci/82/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/564
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/587
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/605
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/605
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/601
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/601/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/601
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/601/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/601
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/601/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/601
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/601/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/601
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/601/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/601
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/601/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote :

LGTM

Revision history for this message
Gerry Boland (gerboland) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/platforms/mirserver/screen.cpp'
2--- src/platforms/mirserver/screen.cpp 2015-10-14 22:59:04 +0000
3+++ src/platforms/mirserver/screen.cpp 2016-02-17 20:10:05 +0000
4@@ -297,6 +297,13 @@
5 qCDebug(QTMIR_SENSOR_MESSAGES) << "Screen::setWindow - overwriting existing ScreenWindow";
6 }
7 m_screenWindow = window;
8+
9+ if (m_screenWindow) {
10+ if (m_screenWindow->geometry() != geometry()) {
11+ qCDebug(QTMIR_SCREENS) << "Screen::setWindow - new geometry for shell surface" << window->window() << geometry();
12+ m_screenWindow->setGeometry(geometry());
13+ }
14+ }
15 }
16
17 void Screen::setMirDisplayBuffer(mir::graphics::DisplayBuffer *buffer, mir::graphics::DisplaySyncGroup *group)
18
19=== modified file 'src/platforms/mirserver/screenwindow.cpp'
20--- src/platforms/mirserver/screenwindow.cpp 2015-10-15 07:05:16 +0000
21+++ src/platforms/mirserver/screenwindow.cpp 2016-02-17 20:10:05 +0000
22@@ -89,7 +89,7 @@
23 auto renderer = QSGRenderLoop::instance();
24 if (exposed) {
25 renderer->show(quickWindow);
26- QWindowSystemInterface::handleExposeEvent(window(), QRegion()); // else it won't redraw
27+ QWindowSystemInterface::handleExposeEvent(window(), geometry()); // else it won't redraw
28 } else {
29 quickWindow->setPersistentOpenGLContext(false);
30 quickWindow->setPersistentSceneGraph(false);

Subscribers

People subscribed via source and target branches