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
=== modified file 'tests/snappy-xmir-test.sh.in'
--- tests/snappy-xmir-test.sh.in 2017-02-23 12:06:45 +0000
+++ tests/snappy-xmir-test.sh.in 2017-03-31 18:49:46 +0000
@@ -2,6 +2,10 @@
22
3set -ex3set -ex
44
5# TODO: Remove these with socket activation
6export GDK_BACKEND=foo
7export QT_QPA_PLATFORM=bar
8
5# Unset MIR_SOCKET as we might be in an environment it exists in9# Unset MIR_SOCKET as we might be in an environment it exists in
610
7export MIR_SOCKET=11export MIR_SOCKET=
@@ -28,3 +32,5 @@
28export UBUNTU_APP_LAUNCH_SNAPPY_XMIR_HELPER="@CMAKE_CURRENT_SOURCE_DIR@/snappy-xmir-test-helper-long.sh"32export UBUNTU_APP_LAUNCH_SNAPPY_XMIR_HELPER="@CMAKE_CURRENT_SOURCE_DIR@/snappy-xmir-test-helper-long.sh"
2933
30@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.sh34@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
35
36exit 0
3137
=== modified file 'utils/snappy-xmir-envvars.c'
--- utils/snappy-xmir-envvars.c 2017-02-22 21:34:16 +0000
+++ utils/snappy-xmir-envvars.c 2017-03-31 18:49:46 +0000
@@ -98,6 +98,10 @@
98 snprintf(mypid, 16, "%ld", (long)getpid());98 snprintf(mypid, 16, "%ld", (long)getpid());
99 copyenv(socketfd, "UBUNTU_APP_LAUNCH_SNAPPY_XMIR_ENVVARS_PID", mypid);99 copyenv(socketfd, "UBUNTU_APP_LAUNCH_SNAPPY_XMIR_ENVVARS_PID", mypid);
100100
101 /* TODO: See xmir-helper */
102 copyenv(socketfd, "GDK_BACKEND", getenv("GDK_BACKEND"));
103 copyenv(socketfd, "QT_QPA_PLATFORM", getenv("QT_QPA_PLATFORM"));
104
101 /* Close the socket */105 /* Close the socket */
102 close(socketfd);106 close(socketfd);
103107
104108
=== modified file 'utils/xmir-helper.c'
--- utils/xmir-helper.c 2017-02-22 21:34:16 +0000
+++ utils/xmir-helper.c 2017-03-31 18:49:46 +0000
@@ -112,6 +112,15 @@
112 /* Set up the display variable */112 /* Set up the display variable */
113 setenv("DISPLAY", displaynumber, 1);113 setenv("DISPLAY", displaynumber, 1);
114114
115 /* TODO: Forcing backends shouldn't be done */
116 /* Here we're forcing Qt and GTK to use the X11 backends until
117 * everything can be fixed with probing and all that. It really
118 * kinda sucks but it's the closest we're gonna get to 'just working'
119 * in the near term. Please kill this code sometime. */
120 setenv("GDK_BACKEND", "x11", 1);
121 setenv("QT_QPA_PLATFORM", "xcb", 1);
122 /* end: code that should die */
123
115 /* Now that we have everything setup, we can execute */124 /* Now that we have everything setup, we can execute */
116 char ** nargv = &argv[2];125 char ** nargv = &argv[2];
117 int execret = execvp(nargv[0], nargv);126 int execret = execvp(nargv[0], nargv);

Subscribers

People subscribed via source and target branches