Merge lp:~robert-ancell/overlay-scrollbar/only-x11 into lp:overlay-scrollbar

Proposed by Robert Ancell
Status: Merged
Merged at revision: 384
Proposed branch: lp:~robert-ancell/overlay-scrollbar/only-x11
Merge into: lp:overlay-scrollbar
Diff against target: 16 lines (+6/-0)
1 file modified
os/os-scrollbar.c (+6/-0)
To merge this branch: bzr merge lp:~robert-ancell/overlay-scrollbar/only-x11
Reviewer Review Type Date Requested Status
Andrea Cimitan Approve
Robert Ancell Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+222466@code.launchpad.net

Commit message

Only attempt to run under X11

Description of the change

Abort if not under X11 so GTK+ applications running under Mir don't crash.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:385
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~robert-ancell/overlay-scrollbar/only-x11/+merge/222466/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/overlay-scrollbar-ci/15/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/overlay-scrollbar-utopic-amd64-ci/1
    SUCCESS: http://jenkins.qa.ubuntu.com/job/overlay-scrollbar-utopic-armhf-ci/1
    SUCCESS: http://jenkins.qa.ubuntu.com/job/overlay-scrollbar-utopic-i386-ci/1

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/overlay-scrollbar-ci/15/rebuild

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
Robert Ancell (robert-ancell) wrote :

(I am testing if you can request that you can request yourself to review your own MP. It appears you can).

review: Approve
Revision history for this message
Andrea Cimitan (cimi) wrote :

Cool

review: Approve
Revision history for this message
Andrea Cimitan (cimi) wrote :

actually, how about gtk2? it doesn't run in mir?

Revision history for this message
Robert Ancell (robert-ancell) wrote :

GTK2 doesn't have GDK_IS_X11_DISPLAY so we can't detect if we're non-X11 quite so easily. We don't have any plans to port GTK2 so it doesn't matter at the moment.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'os/os-scrollbar.c'
2--- os/os-scrollbar.c 2013-12-12 10:17:22 +0000
3+++ os/os-scrollbar.c 2014-06-09 03:56:06 +0000
4@@ -4320,6 +4320,12 @@
5 if (app_is_blacklisted ())
6 return;
7
8+ /* We only support X11 */
9+#if GTK_MAJOR_VERSION == 3
10+ if (!GDK_IS_X11_DISPLAY (gdk_display_get_default ()))
11+ return;
12+#endif
13+
14 /* Initialize static variables. */
15 net_active_window_atom = gdk_x11_get_xatom_by_name ("_NET_ACTIVE_WINDOW");
16 unity_net_workarea_region_atom = gdk_x11_get_xatom_by_name ("_UNITY_NET_WORKAREA_REGION");

Subscribers

People subscribed via source and target branches