Merge lp:~unity-team/qtmir/liveCaption into lp:qtmir

Proposed by Michał Sawicz
Status: Merged
Approved by: Daniel d'Andrada
Approved revision: 391
Merged at revision: 393
Proposed branch: lp:~unity-team/qtmir/liveCaption
Merge into: lp:qtmir
Prerequisite: lp:~alan-griffiths/qtmir/small-refactoring-of-MirWindowManager
Diff against target: 127 lines (+23/-10)
6 files modified
CMakeLists.txt (+1/-1)
debian/control (+1/-1)
src/modules/Unity/Application/mirsurface.cpp (+1/-1)
src/platforms/mirserver/mirwindowmanager.cpp (+12/-5)
src/platforms/mirserver/surfaceobserver.cpp (+5/-0)
src/platforms/mirserver/surfaceobserver.h (+3/-2)
To merge this branch: bzr merge lp:~unity-team/qtmir/liveCaption
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Daniel d'Andrada (community) Approve
Gerry Boland Pending
Review via email: mp+273071@code.launchpad.net

Commit message

React to surface modifications (window caption)

Description of the change

React to surface modifications (window caption)

Cf. https://bugs.launchpad.net/ubuntu/+source/unity-api/+bug/1497092

* Are there any related MPs required for this MP to build/function as expected? Please list.

Yes, build depends on this unity-api MP: https://code.launchpad.net/~lukas-kde/unity-api/liveCaption/+merge/272769
Functionality-wise, also depends on qtubuntu MP: https://code.launchpad.net/~lukas-kde/qtubuntu/liveCaption/+merge/272756

To actually see the results you also need: https://code.launchpad.net/~lukas-kde/unity8/liveCaption/+merge/272760

* Did you perform an exploratory manual test run of your code change and any related functionality?

Yes

* Did you make sure that your branch does not contain spurious tags?

Yes

* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

Yes

* If you changed the UI, has there been a design review?

N/A

To post a comment you must log in.
Revision history for this message
Daniel d'Andrada (dandrader) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2015-10-01 14:03:32 +0000
+++ CMakeLists.txt 2015-10-01 14:03:32 +0000
@@ -75,7 +75,7 @@
75pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt)75pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt)
76pkg_check_modules(QTDBUSTEST libqtdbustest-1 REQUIRED)76pkg_check_modules(QTDBUSTEST libqtdbustest-1 REQUIRED)
77pkg_check_modules(QTDBUSMOCK libqtdbusmock-1 REQUIRED)77pkg_check_modules(QTDBUSMOCK libqtdbusmock-1 REQUIRED)
78pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=8)78pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=9)
7979
80include_directories(${APPLICATION_API_INCLUDE_DIRS})80include_directories(${APPLICATION_API_INCLUDE_DIRS})
8181
8282
=== modified file 'debian/control'
--- debian/control 2015-09-25 12:11:08 +0000
+++ debian/control 2015-10-01 14:03:32 +0000
@@ -93,7 +93,7 @@
93Conflicts: libqtmir,93Conflicts: libqtmir,
94 libunity-mir1,94 libunity-mir1,
95Provides: unity-application-impl,95Provides: unity-application-impl,
96 unity-application-impl-8,96 unity-application-impl-9,
97Description: Qt plugin for Unity specific Mir APIs97Description: Qt plugin for Unity specific Mir APIs
98 QtMir provides Qt/QML bindings for Mir features that are exposed through the98 QtMir provides Qt/QML bindings for Mir features that are exposed through the
99 qtmir-desktop or qtmir-android QPA plugin such as Application management99 qtmir-desktop or qtmir-android QPA plugin such as Application management
100100
=== modified file 'src/modules/Unity/Application/mirsurface.cpp'
--- src/modules/Unity/Application/mirsurface.cpp 2015-09-18 16:33:06 +0000
+++ src/modules/Unity/Application/mirsurface.cpp 2015-10-01 14:03:32 +0000
@@ -158,6 +158,7 @@
158 if (observer) {158 if (observer) {
159 connect(observer.get(), &SurfaceObserver::framesPosted, this, &MirSurface::onFramesPostedObserved);159 connect(observer.get(), &SurfaceObserver::framesPosted, this, &MirSurface::onFramesPostedObserved);
160 connect(observer.get(), &SurfaceObserver::attributeChanged, this, &MirSurface::onAttributeChanged);160 connect(observer.get(), &SurfaceObserver::attributeChanged, this, &MirSurface::onAttributeChanged);
161 connect(observer.get(), &SurfaceObserver::nameChanged, this, &MirSurface::nameChanged);
161 observer->setListener(this);162 observer->setListener(this);
162 }163 }
163164
@@ -468,7 +469,6 @@
468469
469QString MirSurface::name() const470QString MirSurface::name() const
470{471{
471 //FIXME - how to listen to change in this property?
472 return QString::fromStdString(m_surface->name());472 return QString::fromStdString(m_surface->name());
473}473}
474474
475475
=== modified file 'src/platforms/mirserver/mirwindowmanager.cpp'
--- src/platforms/mirserver/mirwindowmanager.cpp 2015-10-01 14:03:32 +0000
+++ src/platforms/mirserver/mirwindowmanager.cpp 2015-10-01 14:03:32 +0000
@@ -26,7 +26,7 @@
2626
27namespace ms = mir::scene;27namespace ms = mir::scene;
2828
29namespace 29namespace
30{30{
31class MirWindowManagerImpl : public MirWindowManager31class MirWindowManagerImpl : public MirWindowManager
32{32{
@@ -63,7 +63,10 @@
63 MirSurfaceAttrib attrib,63 MirSurfaceAttrib attrib,
64 int value) override;64 int value) override;
6565
66 void modify_surface(const std::shared_ptr<mir::scene::Session>&, const std::shared_ptr<mir::scene::Surface>&, const mir::shell::SurfaceSpecification&);66 void modify_surface(
67 const std::shared_ptr<mir::scene::Session>&,
68 const std::shared_ptr<mir::scene::Surface>& surface,
69 const mir::shell::SurfaceSpecification& modifications) override;
6770
68private:71private:
69 std::shared_ptr<mir::shell::DisplayLayout> const m_displayLayout;72 std::shared_ptr<mir::shell::DisplayLayout> const m_displayLayout;
@@ -150,13 +153,17 @@
150 return surface->configure(attrib, value);153 return surface->configure(attrib, value);
151}154}
152155
153void MirWindowManagerImpl::modify_surface(const std::shared_ptr<mir::scene::Session>&, const std::shared_ptr<mir::scene::Surface>&, const mir::shell::SurfaceSpecification&)156void MirWindowManagerImpl::modify_surface(const std::shared_ptr<mir::scene::Session>&,
157 const std::shared_ptr<mir::scene::Surface>& surface,
158 const mir::shell::SurfaceSpecification& modifications)
154{159{
155 // TODO support surface modifications160 if (modifications.name.is_set()) {
161 surface->rename(modifications.name.value());
162 }
156}163}
157164
158std::unique_ptr<MirWindowManager> MirWindowManager::create(165std::unique_ptr<MirWindowManager> MirWindowManager::create(
159 mir::shell::FocusController* /*focus_controller*/, 166 mir::shell::FocusController* /*focus_controller*/,
160 const std::shared_ptr<mir::shell::DisplayLayout> &displayLayout)167 const std::shared_ptr<mir::shell::DisplayLayout> &displayLayout)
161{168{
162 return std::make_unique<MirWindowManagerImpl>(displayLayout);169 return std::make_unique<MirWindowManagerImpl>(displayLayout);
163170
=== modified file 'src/platforms/mirserver/surfaceobserver.cpp'
--- src/platforms/mirserver/surfaceobserver.cpp 2015-08-31 09:51:28 +0000
+++ src/platforms/mirserver/surfaceobserver.cpp 2015-10-01 14:03:32 +0000
@@ -42,6 +42,11 @@
42 }42 }
43}43}
4444
45void SurfaceObserver::renamed(char const * name)
46{
47 Q_EMIT nameChanged(QString::fromUtf8(name));
48}
49
45void SurfaceObserver::attrib_changed(MirSurfaceAttrib attribute, int value)50void SurfaceObserver::attrib_changed(MirSurfaceAttrib attribute, int value)
46{51{
47 if (m_listener) {52 if (m_listener) {
4853
=== modified file 'src/platforms/mirserver/surfaceobserver.h'
--- src/platforms/mirserver/surfaceobserver.h 2015-08-31 09:51:28 +0000
+++ src/platforms/mirserver/surfaceobserver.h 2015-10-01 14:03:32 +0000
@@ -45,12 +45,13 @@
45 void orientation_set_to(MirOrientation) override {}45 void orientation_set_to(MirOrientation) override {}
46 void client_surface_close_requested() override {}46 void client_surface_close_requested() override {}
47 void keymap_changed(xkb_rule_names const &) override {}47 void keymap_changed(xkb_rule_names const &) override {}
48 void renamed(char const *) override {}48 void renamed(char const * name) override;
4949
50Q_SIGNALS:50Q_SIGNALS:
51 void attributeChanged(const MirSurfaceAttrib attribute, const int value);51 void attributeChanged(const MirSurfaceAttrib attribute, const int value);
52 void framesPosted();52 void framesPosted();
53 void resized(QSize size);53 void resized(const QSize &size);
54 void nameChanged(const QString &name);
5455
55private:56private:
56 QObject *m_listener;57 QObject *m_listener;

Subscribers

People subscribed via source and target branches