Merge lp:~dandrader/qtubuntu/exposeMirSurface into lp:qtubuntu

Proposed by Daniel d'Andrada
Status: Merged
Approved by: Gerry Boland
Approved revision: no longer in the source branch.
Merged at revision: 329
Proposed branch: lp:~dandrader/qtubuntu/exposeMirSurface
Merge into: lp:qtubuntu
Prerequisite: lp:~dandrader/qtubuntu/betterSessionName
Diff against target: 74 lines (+25/-5)
3 files modified
debian/changelog (+6/-0)
src/ubuntumirclient/nativeinterface.cpp (+18/-4)
src/ubuntumirclient/nativeinterface.h (+1/-1)
To merge this branch: bzr merge lp:~dandrader/qtubuntu/exposeMirSurface
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Approve
Gerry Boland (community) Approve
Review via email: mp+296983@code.launchpad.net

Commit message

Expose MirSurface to client apps through the native interface

Description of the change

Needed by ubuntu-keyboard to fill out the input shape/region of its surface.

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

PASSED: Continuous integration, rev:323
https://unity8-jenkins.ubuntu.com/job/lp-qtubuntu-ci/73/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/1936
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1962
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1897
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1897
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/1897
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1888
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1888/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1888
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1888/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/1888
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/1888/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1888
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1888/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1888
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1888/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/1888
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/1888/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1888
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1888/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1888
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1888/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/1888
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/1888/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
322. By Daniel d'Andrada

Generate better mir session names

323. By Nick Dedekind

Support for cross building

324. By Gerry Boland

Convert UbuntuOpenGLContext to use QEGLPlatformContext, and allow clients to customize chosen GLConfig (LP: #1507817, #1549455)

325. By Gerry Boland

Integration: no need for the non-const versions of createWindow and createGLContext

326. By CI Train Bot Account

Releasing 0.62+16.10.20160614-0ubuntu1

327. By MichaƂ Sawicz

Revert r324 "EGL convenience" (LP: #1594198)

328. By CI Train Bot Account

Releasing 0.62+16.10.20160620-0ubuntu1

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

LGTM

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:327
https://unity8-jenkins.ubuntu.com/job/lp-qtubuntu-ci/85/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2084
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2112
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2022
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2022
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2022
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2013
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2013/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2013
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2013/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2013
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2013/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2013
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2013/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2013
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2013/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2013
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2013/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2013
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2013/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2013
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2013/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2013
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2013/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
329. By Daniel d'Andrada

Expose MirSurface to client apps through the native interface

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2016-06-20 08:49:40 +0000
3+++ debian/changelog 2016-06-21 12:18:36 +0000
4@@ -1,3 +1,9 @@
5+qtubuntu (0.63) UNRELEASED; urgency=medium
6+
7+ * Expose MirSurface to client apps through the native interface
8+
9+ -- Daniel d'Andrada <daniel.dandrada@canonical.com> Thu, 09 Jun 2016 15:48:12 -0300
10+
11 qtubuntu (0.62+16.10.20160620-0ubuntu1) yakkety; urgency=medium
12
13 * Revert r324 "EGL convenience" (LP: #1594198)
14
15=== modified file 'src/ubuntumirclient/nativeinterface.cpp'
16--- src/ubuntumirclient/nativeinterface.cpp 2016-04-28 14:09:54 +0000
17+++ src/ubuntumirclient/nativeinterface.cpp 2016-06-21 12:18:36 +0000
18@@ -36,6 +36,7 @@
19 insert("nativeorientation", UbuntuNativeInterface::NativeOrientation);
20 insert("display", UbuntuNativeInterface::Display);
21 insert("mirconnection", UbuntuNativeInterface::MirConnection);
22+ insert("mirsurface", UbuntuNativeInterface::MirSurface);
23 insert("scale", UbuntuNativeInterface::Scale);
24 insert("formfactor", UbuntuNativeInterface::FormFactor);
25 }
26@@ -98,9 +99,11 @@
27 if (!ubuntuResourceMap()->contains(kLowerCaseResource))
28 return NULL;
29 const ResourceType kResourceType = ubuntuResourceMap()->value(kLowerCaseResource);
30- if (kResourceType == UbuntuNativeInterface::EglDisplay) {
31+
32+ switch (kResourceType) {
33+ case EglDisplay:
34 return mIntegration->eglDisplay();
35- } else if (kResourceType == UbuntuNativeInterface::NativeOrientation) {
36+ case NativeOrientation:
37 // Return the device's native screen orientation.
38 if (window) {
39 UbuntuScreen *ubuntuScreen = static_cast<UbuntuScreen*>(window->screen()->handle());
40@@ -110,8 +113,19 @@
41 mNativeOrientation = new Qt::ScreenOrientation(platformScreen->nativeOrientation());
42 }
43 return mNativeOrientation;
44- } else {
45- return NULL;
46+ case MirSurface:
47+ if (window) {
48+ auto ubuntuWindow = static_cast<UbuntuWindow*>(window->handle());
49+ if (ubuntuWindow) {
50+ return ubuntuWindow->mirSurface();
51+ } else {
52+ return nullptr;
53+ }
54+ } else {
55+ return nullptr;
56+ }
57+ default:
58+ return nullptr;
59 }
60 }
61
62
63=== modified file 'src/ubuntumirclient/nativeinterface.h'
64--- src/ubuntumirclient/nativeinterface.h 2016-04-28 14:09:54 +0000
65+++ src/ubuntumirclient/nativeinterface.h 2016-06-21 12:18:36 +0000
66@@ -26,7 +26,7 @@
67 class UbuntuNativeInterface : public QPlatformNativeInterface {
68 Q_OBJECT
69 public:
70- enum ResourceType { EglDisplay, EglContext, NativeOrientation, Display, MirConnection, Scale, FormFactor };
71+ enum ResourceType { EglDisplay, EglContext, NativeOrientation, Display, MirConnection, MirSurface, Scale, FormFactor };
72
73 UbuntuNativeInterface(const UbuntuClientIntegration *integration);
74 ~UbuntuNativeInterface();

Subscribers

People subscribed via source and target branches