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

Proposed by Lukáš Tinkl
Status: Superseded
Proposed branch: lp:~lukas-kde/qtmir/use-miral-shell-chrome
Merge into: lp:qtmir
Prerequisite: lp:~lukas-kde/qtmir/betterSessionManagement
Diff against target: 41 lines (+10/-3)
2 files modified
src/common/mirqtconversion.h (+9/-0)
src/modules/Unity/Application/mirsurface.cpp (+1/-3)
To merge this branch: bzr merge lp:~lukas-kde/qtmir/use-miral-shell-chrome
Reviewer Review Type Date Requested Status
Mir development team Pending
Review via email: mp+316500@code.launchpad.net

This proposal has been superseded by a proposal from 2017-02-07.

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.
591. By Lukáš Tinkl

use the shell_chrome, as provided by WindowInfo::shell_chrome()

592. By Lukáš Tinkl

use the conversion instead of static_cast

593. By Lukáš Tinkl

merge trunk

594. By Lukáš Tinkl

this depends on miral >= 1.2

https://bileto.ubuntu.com/#/ticket/2476

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/common/mirqtconversion.h'
2--- src/common/mirqtconversion.h 2017-01-18 21:24:15 +0000
3+++ src/common/mirqtconversion.h 2017-02-07 15:02:47 +0000
4@@ -113,6 +113,15 @@
5 }
6 }
7
8+inline Mir::ShellChrome toQtShellChrome(MirShellChrome chrome)
9+{
10+ switch (chrome) {
11+ case mir_shell_chrome_normal: return Mir::NormalChrome;
12+ case mir_shell_chrome_low: return Mir::LowChrome;
13+ default: Q_UNREACHABLE();
14+ }
15+}
16+
17 } // namespace qtmir
18
19 #endif // MIRQTCONVERSION_H
20
21=== modified file 'src/modules/Unity/Application/mirsurface.cpp'
22--- src/modules/Unity/Application/mirsurface.cpp 2017-01-26 17:50:12 +0000
23+++ src/modules/Unity/Application/mirsurface.cpp 2017-02-07 15:02:47 +0000
24@@ -132,7 +132,7 @@
25 , m_position(toQPoint(m_window.top_left()))
26 , m_size(toQSize(m_window.size()))
27 , m_state(toQtState(newWindowInfo.windowInfo.state()))
28- , m_shellChrome(Mir::NormalChrome)
29+ , m_shellChrome(toQtShellChrome(newWindowInfo.windowInfo.shell_chrome()))
30 {
31 DEBUG_MSG << "("
32 << "type=" << mirSurfaceTypeToStr(m_type)
33@@ -142,8 +142,6 @@
34 SurfaceObserver::registerObserverForSurface(m_surfaceObserver.get(), m_surface.get());
35 m_surface->add_observer(m_surfaceObserver);
36
37- //m_shellChrome = creationHints.shellChrome; TODO - where will this come from now?
38-
39 connect(m_surfaceObserver.get(), &SurfaceObserver::framesPosted, this, &MirSurface::onFramesPostedObserved);
40 connect(m_surfaceObserver.get(), &SurfaceObserver::attributeChanged, this, &MirSurface::onAttributeChanged);
41 connect(m_surfaceObserver.get(), &SurfaceObserver::nameChanged, this, &MirSurface::onNameChanged);

Subscribers

People subscribed via source and target branches