Merge lp:~attente/compiz/1284532 into lp:compiz/0.9.11

Proposed by William Hua
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: 3842
Merged at revision: 3841
Proposed branch: lp:~attente/compiz/1284532
Merge into: lp:compiz/0.9.11
Diff against target: 102 lines (+54/-1)
6 files modified
debian/00_remove_gnomecompat_in_unity_session.py (+48/-0)
debian/compiz-gnome.migrations (+1/-0)
debian/profile_upgrades/com.canonical.unity.unity.07.upgrade (+2/-0)
debian/unity.ini (+1/-1)
plugins/gnomecompat/gnomecompat.xml.in (+1/-0)
src/action.cpp (+1/-0)
To merge this branch: bzr merge lp:~attente/compiz/1284532
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
PS Jenkins bot (community) continuous-integration Approve
Christopher Townsend Approve
Review via email: mp+208908@code.launchpad.net

Commit message

Disable the gnomecompat plugin under Unity by default.

Description of the change

Disable the gnomecompat plugin under Unity by default.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Christopher Townsend (townsend) wrote :

Hi William,

Thanks for doing this.

We think this would be better as a distro patch since other downstreams may still need this capability.

review: Needs Fixing
Revision history for this message
William Hua (attente) wrote :

So it turned out after all that the two keys that gnomecompat implements which unity-settings-daemon doesn't are already implemented in Unity, so it is enough to just disable gnomecompat under Unity and everything still works. And since the user's active-plugins list is most likely already set to a non-default, the only thing we can do is to explicitly blacklist gnomecompat when the session is Unity.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Christopher Townsend (townsend) wrote :

Works as expected now. Thanks!

review: Approve
lp:~attente/compiz/1284532 updated
3839. By William Hua

Try again.

3840. By William Hua

Remove gnomecompat in unity profile.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
William Hua (attente) wrote :

It seems to be working...

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

57 +++ debian/compiz-gnome.gconf-defaults 2014-03-10 15:23:05 +0000

Not sure if we want to change this as well, since that would be loaded by flashback session, so probably we can keep it as default on (the migration script will then remove it for the unity session).

We also probably want this http://pastebin.ubuntu.com/7070118/ (as ccsm looks more to feature than to conflicts)...

Revision history for this message
William Hua (attente) wrote :

Just to confirm, you mean that flashback is loading the unity profile instead of default?

lp:~attente/compiz/1284532 updated
3841. By William Hua

Specify wmkeybindings for gnomecompat plugin.

3842. By William Hua

Revert changes to debian/compiz-gnome.gconf-defaults.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'debian/00_remove_gnomecompat_in_unity_session.py'
2--- debian/00_remove_gnomecompat_in_unity_session.py 1970-01-01 00:00:00 +0000
3+++ debian/00_remove_gnomecompat_in_unity_session.py 2014-03-11 14:05:28 +0000
4@@ -0,0 +1,48 @@
5+#!/usr/bin/python
6+# -*- coding: utf-8 -*-
7+# Copyright (C) 2014 Canonical
8+#
9+# Authors:
10+# Marco Trevisan <marco.trevisan@canonical.com>
11+# William Hua <william.hua@canonical.com>
12+#
13+# This program is free software; you can redistribute it and/or modify it under
14+# the terms of the GNU General Public License as published by the Free Software
15+# Foundation; version 3.
16+#
17+# This program is distributed in the hope that it will be useful, but WITHOUTa
18+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
20+# details.
21+#
22+# You should have received a copy of the GNU General Public License along with
23+# this program; if not, write to the Free Software Foundation, Inc.,
24+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25+
26+from gi.repository import Gio
27+import os,sys
28+
29+COMPIZ_SCHEMA = "org.compiz"
30+COMPIZ_CORE_PATH = "/org/compiz/profiles/unity/plugins/core/"
31+
32+if COMPIZ_SCHEMA not in Gio.Settings.list_schemas():
33+ print("No compiz schemas found, no migration needed")
34+ sys.exit(0)
35+
36+core_settings = Gio.Settings(schema=COMPIZ_SCHEMA+".core", path=COMPIZ_CORE_PATH)
37+active_plugins = core_settings.get_strv("active-plugins")
38+
39+if not "gnomecompat" in active_plugins:
40+ print("No gnomecompat plugin active, no migration needed")
41+ sys.exit(0)
42+
43+try:
44+ active_plugins.remove("gnomecompat")
45+except ValueError:
46+ pass
47+
48+# gsettings doesn't work directly, the key is somewhat reverted. Work one level under then: dconf!
49+# gsettings.set_strv("active-plugins", active_plugins)
50+from subprocess import Popen, PIPE, STDOUT
51+p = Popen(("dconf load "+COMPIZ_CORE_PATH).split(), stdout=PIPE, stdin=PIPE, stderr=STDOUT)
52+p.communicate(input="[/]\nactive-plugins={}".format(active_plugins).encode('utf-8'))
53
54=== modified file 'debian/00_remove_scalefilter_in_unity_session.py' (properties changed: -x to +x)
55=== modified file 'debian/compiz-gnome.migrations'
56--- debian/compiz-gnome.migrations 2014-02-17 20:57:18 +0000
57+++ debian/compiz-gnome.migrations 2014-03-11 14:05:28 +0000
58@@ -3,3 +3,4 @@
59 debian/00_remove_unityshell_in_gnome_session.py
60 debian/00_remove_decor_in_unity_session.py
61 debian/00_remove_scalefilter_in_unity_session.py
62+debian/00_remove_gnomecompat_in_unity_session.py
63
64=== added file 'debian/profile_upgrades/com.canonical.unity.unity.07.upgrade'
65--- debian/profile_upgrades/com.canonical.unity.unity.07.upgrade 1970-01-01 00:00:00 +0000
66+++ debian/profile_upgrades/com.canonical.unity.unity.07.upgrade 2014-03-11 14:05:28 +0000
67@@ -0,0 +1,2 @@
68+[core]
69+-s0_active_plugins = gnomecompat
70
71=== modified file 'debian/unity.ini'
72--- debian/unity.ini 2014-02-09 17:59:34 +0000
73+++ debian/unity.ini 2014-03-11 14:05:28 +0000
74@@ -1,3 +1,3 @@
75 [core]
76-s0_active_plugins = core;composite;opengl;copytex;compiztoolbox;vpswitch;snap;mousepoll;resize;place;move;wall;grid;regex;imgpng;session;gnomecompat;animation;fade;unitymtgrabhandles;workarounds;scale;expo;ezoom;commands;unityshell
77+s0_active_plugins = core;composite;opengl;copytex;compiztoolbox;vpswitch;snap;mousepoll;resize;place;move;wall;grid;regex;imgpng;session;animation;fade;unitymtgrabhandles;workarounds;scale;expo;ezoom;commands;unityshell
78
79
80=== modified file 'plugins/gnomecompat/gnomecompat.xml.in'
81--- plugins/gnomecompat/gnomecompat.xml.in 2012-10-15 10:31:51 +0000
82+++ plugins/gnomecompat/gnomecompat.xml.in 2014-03-11 14:05:28 +0000
83@@ -4,6 +4,7 @@
84 <_short>Gnome Compatibility</_short>
85 <_long>Options that keep Compiz compatible to the Gnome desktop environment</_long>
86 <category>General</category>
87+ <feature>wmkeybindings</feature>
88 <deps>
89 <relation type="after">
90 <plugin>composite</plugin>
91
92=== modified file 'src/action.cpp'
93--- src/action.cpp 2013-12-20 19:13:06 +0000
94+++ src/action.cpp 2014-03-11 14:05:28 +0000
95@@ -43,6 +43,7 @@
96 {
97 { "<Shift>", ShiftMask },
98 { "<Control>", ControlMask },
99+ { "<Ctrl>", ControlMask },
100 { "<Primary>", ControlMask },
101 { "<Mod1>", Mod1Mask },
102 { "<Mod2>", Mod2Mask },

Subscribers

People subscribed via source and target branches