Merge lp:~lukas-kde/qtmir/use-miral-shell-chrome into lp:qtmir

Proposed by Lukáš Tinkl on 2017-02-07
Status: Merged
Approved by: Michał Sawicz on 2017-03-02
Approved revision: 594
Merged at revision: 612
Proposed branch: lp:~lukas-kde/qtmir/use-miral-shell-chrome
Merge into: lp:qtmir
Diff against target: 63 lines (+12/-5)
3 files modified
debian/control (+1/-1)
src/common/mirqtconversion.h (+9/-0)
src/modules/Unity/Application/mirsurface.cpp (+2/-4)
To merge this branch: bzr merge lp:~lukas-kde/qtmir/use-miral-shell-chrome
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Approve on 2017-03-01
Gerry Boland (community) 2017-02-07 Approve on 2017-02-07
Review via email: mp+316574@code.launchpad.net

This proposal supersedes a proposal from 2017-02-06.

Commit message

Use the shell chrome, as provided by miral window info

Description of the change

Use the shell chrome, as provided by miral window info

Requires: https://code.launchpad.net/~lukas-kde/miral/shellchrome-windowinfo/+merge/316331

To post a comment you must log in.
Gerry Boland (gerboland) wrote :

Small nicety I'd appreciate you doing:

    connect(m_surfaceObserver.get(), &SurfaceObserver::shellChromeChanged, this, [&](MirShellChrome shell_chrome) {
        setShellChrome(static_cast<Mir::ShellChrome>(shell_chrome));

Please use toQtShellChrome instead of the static_cast here

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

> Small nicety I'd appreciate you doing:
>
> connect(m_surfaceObserver.get(), &SurfaceObserver::shellChromeChanged,
> this, [&](MirShellChrome shell_chrome) {
> setShellChrome(static_cast<Mir::ShellChrome>(shell_chrome));
>
> Please use toQtShellChrome instead of the static_cast here

Done, also merged with trunk and resolved conflicts there, now that the silo 2313 had landed

Gerry Boland (gerboland) wrote :

LGTM!

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

PASSED: Continuous integration, rev:594
https://unity8-jenkins.ubuntu.com/job/lp-qtmir-ci/536/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4256
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4284
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4117
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4117/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4117
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4117/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4117
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4117/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4117
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4117/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4117
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4117/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4117
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4117/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2017-02-02 09:17:48 +0000
3+++ debian/control 2017-02-15 13:13:19 +0000
4@@ -13,7 +13,7 @@
5 libglib2.0-dev,
6 libgsettings-qt-dev,
7 liblttng-ust-dev,
8- libmiral-dev (>= 1.1.0),
9+ libmiral-dev (>= 1.2),
10 libmirclient-dev (>= 0.26.0),
11 libmircommon-dev (>= 0.26.0),
12 libmirserver-dev (>= 0.26.0),
13
14=== modified file 'src/common/mirqtconversion.h'
15--- src/common/mirqtconversion.h 2017-01-18 21:24:15 +0000
16+++ src/common/mirqtconversion.h 2017-02-15 13:13:19 +0000
17@@ -113,6 +113,15 @@
18 }
19 }
20
21+inline Mir::ShellChrome toQtShellChrome(MirShellChrome chrome)
22+{
23+ switch (chrome) {
24+ case mir_shell_chrome_normal: return Mir::NormalChrome;
25+ case mir_shell_chrome_low: return Mir::LowChrome;
26+ default: Q_UNREACHABLE();
27+ }
28+}
29+
30 } // namespace qtmir
31
32 #endif // MIRQTCONVERSION_H
33
34=== modified file 'src/modules/Unity/Application/mirsurface.cpp'
35--- src/modules/Unity/Application/mirsurface.cpp 2017-02-06 09:11:04 +0000
36+++ src/modules/Unity/Application/mirsurface.cpp 2017-02-15 13:13:19 +0000
37@@ -133,7 +133,7 @@
38 , m_surfaceObserver(std::make_shared<SurfaceObserverImpl>())
39 , m_size(toQSize(m_window.size()))
40 , m_state(toQtState(newWindowInfo.windowInfo.state()))
41- , m_shellChrome(Mir::NormalChrome)
42+ , m_shellChrome(toQtShellChrome(newWindowInfo.windowInfo.shell_chrome()))
43 , m_parentSurface(parentSurface)
44 , m_childSurfaceList(new MirSurfaceListModel(this))
45 {
46@@ -149,8 +149,6 @@
47 SurfaceObserver::registerObserverForSurface(m_surfaceObserver.get(), m_surface.get());
48 m_surface->add_observer(m_surfaceObserver);
49
50- //m_shellChrome = creationHints.shellChrome; TODO - where will this come from now?
51-
52 connect(m_surfaceObserver.get(), &SurfaceObserver::framesPosted, this, &MirSurface::onFramesPostedObserved);
53 connect(m_surfaceObserver.get(), &SurfaceObserver::attributeChanged, this, &MirSurface::onAttributeChanged);
54 connect(m_surfaceObserver.get(), &SurfaceObserver::nameChanged, this, &MirSurface::onNameChanged);
55@@ -162,7 +160,7 @@
56 connect(m_surfaceObserver.get(), &SurfaceObserver::widthIncrementChanged, this, &MirSurface::onWidthIncrementChanged);
57 connect(m_surfaceObserver.get(), &SurfaceObserver::heightIncrementChanged, this, &MirSurface::onHeightIncrementChanged);
58 connect(m_surfaceObserver.get(), &SurfaceObserver::shellChromeChanged, this, [&](MirShellChrome shell_chrome) {
59- setShellChrome(static_cast<Mir::ShellChrome>(shell_chrome));
60+ setShellChrome(toQtShellChrome(shell_chrome));
61 });
62 connect(m_surfaceObserver.get(), &SurfaceObserver::inputBoundsChanged, this, &MirSurface::setInputBounds);
63 connect(m_surfaceObserver.get(), &SurfaceObserver::confinesMousePointerChanged, this, &MirSurface::confinesMousePointerChanged);

Subscribers

People subscribed via source and target branches