Merge lp:~ted/ubuntu-app-launch/force-gdk-qt-x11-backends into lp:ubuntu-app-launch

Proposed by Ted Gould
Status: Merged
Approved by: Ted Gould
Approved revision: 309
Merged at revision: 315
Proposed branch: lp:~ted/ubuntu-app-launch/force-gdk-qt-x11-backends
Merge into: lp:ubuntu-app-launch
Diff against target: 55 lines (+19/-0)
3 files modified
tests/snappy-xmir-test.sh.in (+6/-0)
utils/snappy-xmir-envvars.c (+4/-0)
utils/xmir-helper.c (+9/-0)
To merge this branch: bzr merge lp:~ted/ubuntu-app-launch/force-gdk-qt-x11-backends
Reviewer Review Type Date Requested Status
Pete Woods (community) Approve
unity-api-1-bot continuous-integration Needs Fixing
Review via email: mp+321599@code.launchpad.net

Commit message

Force GTK and Qt backends when using XMir

To post a comment you must log in.
309. By Ted Gould

Move the code into the xmir-helper

Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

FAILED: Continuous integration, rev:308
https://jenkins.canonical.com/unity-api-1/job/lp-ubuntu-app-launch-ci/289/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build/1900/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/1907
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1689/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1689
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1689/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1689/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1689
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1689/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1689/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1689
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1689/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-ubuntu-app-launch-ci/289/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
William Hua (attente) :
Revision history for this message
Ted Gould (ted) :
Revision history for this message
Pete Woods (pete-woods) :
review: Approve
Revision history for this message
Pete Woods (pete-woods) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/snappy-xmir-test.sh.in'
2--- tests/snappy-xmir-test.sh.in 2017-02-23 12:06:45 +0000
3+++ tests/snappy-xmir-test.sh.in 2017-03-31 18:49:46 +0000
4@@ -2,6 +2,10 @@
5
6 set -ex
7
8+# TODO: Remove these with socket activation
9+export GDK_BACKEND=foo
10+export QT_QPA_PLATFORM=bar
11+
12 # Unset MIR_SOCKET as we might be in an environment it exists in
13
14 export MIR_SOCKET=
15@@ -28,3 +32,5 @@
16 export UBUNTU_APP_LAUNCH_SNAPPY_XMIR_HELPER="@CMAKE_CURRENT_SOURCE_DIR@/snappy-xmir-test-helper-long.sh"
17
18 @CMAKE_BINARY_DIR@/utils/snappy-xmir "this-is-a-really-really-really_long_appid-that-we-shouldnt-reallyhave_13523432324235.234.234.234234+foo" @CMAKE_CURRENT_SOURCE_DIR@/snappy-xmir-test-check.sh
19+
20+exit 0
21
22=== modified file 'utils/snappy-xmir-envvars.c'
23--- utils/snappy-xmir-envvars.c 2017-02-22 21:34:16 +0000
24+++ utils/snappy-xmir-envvars.c 2017-03-31 18:49:46 +0000
25@@ -98,6 +98,10 @@
26 snprintf(mypid, 16, "%ld", (long)getpid());
27 copyenv(socketfd, "UBUNTU_APP_LAUNCH_SNAPPY_XMIR_ENVVARS_PID", mypid);
28
29+ /* TODO: See xmir-helper */
30+ copyenv(socketfd, "GDK_BACKEND", getenv("GDK_BACKEND"));
31+ copyenv(socketfd, "QT_QPA_PLATFORM", getenv("QT_QPA_PLATFORM"));
32+
33 /* Close the socket */
34 close(socketfd);
35
36
37=== modified file 'utils/xmir-helper.c'
38--- utils/xmir-helper.c 2017-02-22 21:34:16 +0000
39+++ utils/xmir-helper.c 2017-03-31 18:49:46 +0000
40@@ -112,6 +112,15 @@
41 /* Set up the display variable */
42 setenv("DISPLAY", displaynumber, 1);
43
44+ /* TODO: Forcing backends shouldn't be done */
45+ /* Here we're forcing Qt and GTK to use the X11 backends until
46+ * everything can be fixed with probing and all that. It really
47+ * kinda sucks but it's the closest we're gonna get to 'just working'
48+ * in the near term. Please kill this code sometime. */
49+ setenv("GDK_BACKEND", "x11", 1);
50+ setenv("QT_QPA_PLATFORM", "xcb", 1);
51+ /* end: code that should die */
52+
53 /* Now that we have everything setup, we can execute */
54 char ** nargv = &argv[2];
55 int execret = execvp(nargv[0], nargv);

Subscribers

People subscribed via source and target branches