Merge lp:~mterry/unity8/platform-api into lp:unity8

Proposed by Michael Terry
Status: Rejected
Rejected by: Michael Terry
Proposed branch: lp:~mterry/unity8/platform-api
Merge into: lp:unity8
Diff against target: 41 lines (+6/-7)
2 files modified
debian/control (+1/-0)
src/main.cpp (+5/-7)
To merge this branch: bzr merge lp:~mterry/unity8/platform-api
Reviewer Review Type Date Requested Status
Michael Terry Abstain
Albert Astals Cid (community) Needs Fixing
Michał Sawicz Abstain
Michael Zanetti (community) Abstain
Gerry Boland (community) Abstain
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+220978@code.launchpad.net

Commit message

Rely on platform-api's headers for symbolic constants rather than hard-coding numbers.

Description of the change

Rely on platform-api's headers for symbolic constants rather than hard-coding numbers.

There are three changes here:

A) Set the "session" property of QPlatformNativeInterface rather than "ubuntuSessionType" -- it's been renamed and support for "ubuntuSessionType" will presumably go away at some point [1].

B) Use U_SYSTEM_SESSION rather than 1.

C) Use U_INDICATOR_ROLE rather than 2. This one is controversial. The old code suggests that 2 == INDICATOR_ACTOR_ROLE [2]. But 2 == U_DASH_ROLE instead of U_INDICATOR_ROLE. Even the log output in qtubuntu suggests that 2 is the "Indicator" role, though that logging code is clearly antiquated [3]. This whole problem is a case study in why we should use symbolic names. :) It doesn't even matter though, since the only role that does anything is U_ON_SCREEN_KEYBOARD_ROLE [4]. Plus, do we even want to set just one role for the whole unity8 window? Regardless, I've tried to leave the original intent by using U_INDICATOR_ROLE.

[1] See qtubuntu's src/platforms/ubuntu/ubuntucommon/integration.cc
[2] view->setProperty("role", 2); // INDICATOR_ACTOR_ROLE
[3] See qtubuntu's src/platforms/ubuntu/ubuntucommon/window.cc
[4] See platform-api's src/ubuntu/mirclient/window_properties_mirclient.cpp

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

 * Did you perform an exploratory manual test run of your code change and any related functionality?
 - I built it.

 * 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?
 - I am on that team

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

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

* Did you perform an exploratory manual test run of the code change and any related functionality?
Yes, works and the rationale on the description makes sense.

* Did CI run pass? If not, please explain why.
Known broken tests in process of being fixed.

review: Approve
Revision history for this message
Albert Astals Cid (aacid) wrote :

Text conflict in debian/control
1 conflicts encountered.

review: Needs Fixing
Revision history for this message
Michael Terry (mterry) wrote :

Merged from trunk

Revision history for this message
Albert Astals Cid (aacid) :
review: Approve
Revision history for this message
Gerry Boland (gerboland) wrote :

I don't think these are of any use any more, they're a holdover from the surface flinger days. Try removing them and see if there's any consequences, I expect none

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

Text conflict in debian/control
1 conflicts encountered.

Revision history for this message
Michał Sawicz (saviq) wrote :

Description-en: dummy transitional package for libplatform-api-headers
 This is a dummy transitional package, please use libubuntu-application-api-headers
 instead.

review: Needs Fixing
lp:~mterry/unity8/platform-api updated
920. By Michael Terry

Update header package name

921. By Michael Terry

Merge from trunk

Revision history for this message
Michael Terry (mterry) wrote :

Updated header package to libubuntu-application-api-headers, good catch Saviq. Fixed merged conflict too.

As for Gerry's suggestion of removing this code completely and seeing if anything breaks yet, I believe this code is still used. "role" is only apparently used today if we are the OSK role, but that's in Mir code. So clearly Mir is reserving the right to care about the role we set.

As for the session property, that does seem to percolate down through to the Android layer and affect the oom scores and similar issues.

So I still think this merge is valid.

Revision history for this message
Michał Sawicz (saviq) :
review: Abstain
Revision history for this message
Michael Terry (mterry) wrote :

Did you mean to abstain?

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

Yeah, I didn't really review it, so approving felt wrong.

Revision history for this message
Albert Astals Cid (aacid) wrote :

Text conflict in debian/control
1 conflicts encountered.

review: Needs Fixing
lp:~mterry/unity8/platform-api updated
922. By Michael Terry

Merge from trunk

Revision history for this message
Michael Terry (mterry) wrote :

I merged from trunk, resolving the conflict.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Merge issues have been fixed

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

> As for Gerry's suggestion of removing this code completely and seeing if
> anything breaks yet, I believe this code is still used. "role" is only
> apparently used today if we are the OSK role, but that's in Mir code. So
> clearly Mir is reserving the right to care about the role we set.
>
> As for the session property, that does seem to percolate down through to
> the Android layer and affect the oom scores and similar issues.

So I dug into this, and you're right, it's used still. Not for long however as QtComp makes this unnecessary.

review: Abstain
Revision history for this message
Michael Terry (mterry) wrote :

I'm going for the record of most abstains on a single merge! ;)

Revision history for this message
Michael Zanetti (mzanetti) :
review: Abstain
Revision history for this message
Michał Sawicz (saviq) :
review: Abstain
Revision history for this message
Albert Astals Cid (aacid) wrote :

Text conflict in src/main.cpp
1 conflicts encountered.

review: Needs Fixing
Revision history for this message
Michael Terry (mterry) wrote :

This has been made obsolete by Gerry's qtcompositor work.

review: Abstain

Unmerged revisions

922. By Michael Terry

Merge from trunk

921. By Michael Terry

Merge from trunk

920. By Michael Terry

Update header package name

919. By Michael Terry

Merge from trunk

918. By Michael Terry

Use libplatform-api-headers

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 2014-07-09 19:44:14 +0000
3+++ debian/control 2014-07-14 15:31:16 +0000
4@@ -19,6 +19,7 @@
5 libpulse-dev,
6 libqmenumodel-dev (>= 0.2.7),
7 libqt5xmlpatterns5-dev,
8+ libubuntu-application-api-headers,
9 libunity-api-dev (>= 7.85),
10 libunity-mir-dev,
11 libusermetricsoutput1-dev,
12
13=== modified file 'src/main.cpp'
14--- src/main.cpp 2014-07-03 14:45:43 +0000
15+++ src/main.cpp 2014-07-14 15:31:16 +0000
16@@ -29,6 +29,8 @@
17 #include <libintl.h>
18 #include <dlfcn.h>
19 #include <csignal>
20+#include <ubuntu/application/ui/session.h>
21+#include <ubuntu/application/ui/window_properties.h>
22
23 // local
24 #include <paths.h>
25@@ -142,13 +144,9 @@
26 }
27
28 QPlatformNativeInterface* nativeInterface = QGuiApplication::platformNativeInterface();
29- /* Shell is declared as a system session so that it always receives all
30- input events.
31- FIXME: use the enum value corresponding to SYSTEM_SESSION_TYPE (= 1)
32- when it becomes available.
33- */
34- nativeInterface->setProperty("ubuntuSessionType", 1);
35- view->setProperty("role", 2); // INDICATOR_ACTOR_ROLE
36+ // Shell is declared as a system session so that it always receives all input events.
37+ nativeInterface->setProperty("session", U_SYSTEM_SESSION);
38+ view->setProperty("role", U_INDICATOR_ROLE);
39
40 QUrl source(::qmlDirectory()+"Shell.qml");
41 prependImportPaths(view->engine(), ::overrideImportPaths());

Subscribers

People subscribed via source and target branches