Merge lp:~timo-jyrinki/compiz/ubuntu.0982 into lp:ubuntu/quantal/compiz

Proposed by Timo Jyrinki on 2012-09-11
Status: Merged
Merged at revision: 3292
Proposed branch: lp:~timo-jyrinki/compiz/ubuntu.0982
Merge into: lp:ubuntu/quantal/compiz
Diff against target: 18751 lines (+12055/-2496)
268 files modified
AUTHORS (+36/-16)
CMakeLists.txt (+0/-6)
NEWS (+57/-0)
VERSION (+1/-1)
cmake/CompizCommon.cmake (+1/-1)
cmake/CompizGSettings.cmake (+8/-2)
cmake/CompizPlugin.cmake (+0/-3)
cmake/FindCompiz.cmake (+1/-4)
compizconfig/ccsm/CMakeLists.txt (+8/-10)
compizconfig/ccsm/VERSION (+0/-1)
compizconfig/ccsm/ccm/Widgets.py (+1/-1)
compizconfig/ccsm/setup.py (+31/-8)
compizconfig/cmake/exec_setup_py_with_destdir.cmake (+2/-1)
compizconfig/compizconfig-python/CMakeLists.txt (+14/-17)
compizconfig/compizconfig-python/VERSION (+0/-1)
compizconfig/compizconfig-python/compizconfig-python.pc.in (+1/-1)
compizconfig/compizconfig-python/setup.py (+29/-11)
compizconfig/compizconfig-python/src/compizconfig.pyx (+0/-30)
compizconfig/gconf/VERSION (+0/-1)
compizconfig/gsettings/VERSION (+0/-1)
compizconfig/integration/gnome/gsettings/org.compiz.integrated.gschema.xml (+11/-11)
compizconfig/integration/gnome/include/ccs_gnome_integration_constants.h (+1/-1)
compizconfig/libcompizconfig/CMakeLists.txt (+4/-11)
compizconfig/libcompizconfig/VERSION (+0/-1)
compizconfig/libcompizconfig/cmake/FindCompizConfig.cmake (+1/-1)
compizconfig/libcompizconfig/include/CMakeLists.txt (+1/-0)
compizconfig/libcompizconfig/src/CMakeLists.txt (+10/-1)
compizconfig/libcompizconfig/src/ccs_settings_upgrade_internal.c (+168/-0)
compizconfig/libcompizconfig/src/ccs_settings_upgrade_internal.h (+41/-0)
compizconfig/libcompizconfig/src/main.c (+184/-163)
compizconfig/libcompizconfig/tests/CMakeLists.txt (+13/-0)
compizconfig/libcompizconfig/tests/compizconfig_test_ccs_settings_upgrade_internal.cpp (+70/-0)
debian/changelog (+62/-3)
debian/compiz-dev.install (+9/-1)
debian/compiz-gnome.migrations (+1/-0)
debian/patches/100_expo_layout.patch (+2903/-0)
debian/patches/series (+1/-0)
gtk/gnome/50-compiz-launchers.xml.in (+1/-1)
gtk/window-decorator/CMakeLists.txt (+89/-20)
gtk/window-decorator/blurprops.c (+5/-2)
gtk/window-decorator/cairo.c (+2/-2)
gtk/window-decorator/decorator.c (+17/-33)
gtk/window-decorator/events.c (+23/-10)
gtk/window-decorator/frames.c (+6/-5)
gtk/window-decorator/gtk-window-decorator.c (+67/-120)
gtk/window-decorator/gtk-window-decorator.h (+35/-78)
gtk/window-decorator/gwd-settings-interface.c (+181/-0)
gtk/window-decorator/gwd-settings-interface.h (+103/-0)
gtk/window-decorator/gwd-settings-notified-interface.c (+56/-0)
gtk/window-decorator/gwd-settings-notified-interface.h (+64/-0)
gtk/window-decorator/gwd-settings-notified.c (+283/-0)
gtk/window-decorator/gwd-settings-notified.h (+38/-0)
gtk/window-decorator/gwd-settings-storage-gconf.c (+425/-0)
gtk/window-decorator/gwd-settings-storage-gconf.h (+56/-0)
gtk/window-decorator/gwd-settings-storage-gsettings.c (+567/-0)
gtk/window-decorator/gwd-settings-storage-gsettings.h (+85/-0)
gtk/window-decorator/gwd-settings-storage-interface.c (+82/-0)
gtk/window-decorator/gwd-settings-storage-interface.h (+67/-0)
gtk/window-decorator/gwd-settings-writable-interface.c (+153/-0)
gtk/window-decorator/gwd-settings-writable-interface.h (+150/-0)
gtk/window-decorator/gwd-settings-xproperty-interface.c (+35/-0)
gtk/window-decorator/gwd-settings-xproperty-interface.h (+52/-0)
gtk/window-decorator/gwd-settings-xproperty-storage.c (+296/-0)
gtk/window-decorator/gwd-settings-xproperty-storage.h (+42/-0)
gtk/window-decorator/gwd-settings.c (+934/-0)
gtk/window-decorator/gwd-settings.h (+40/-0)
gtk/window-decorator/metacity.c (+59/-39)
gtk/window-decorator/org.compiz.gwd.gschema.xml (+47/-0)
gtk/window-decorator/settings.c (+76/-631)
gtk/window-decorator/tests/CMakeLists.txt (+114/-0)
gtk/window-decorator/tests/compiz_gwd_mock_settings.cpp (+205/-0)
gtk/window-decorator/tests/compiz_gwd_mock_settings.h (+86/-0)
gtk/window-decorator/tests/compiz_gwd_mock_settings_notified.cpp (+192/-0)
gtk/window-decorator/tests/compiz_gwd_mock_settings_notified.h (+71/-0)
gtk/window-decorator/tests/compiz_gwd_mock_settings_storage.cpp (+211/-0)
gtk/window-decorator/tests/compiz_gwd_mock_settings_storage.h (+80/-0)
gtk/window-decorator/tests/compiz_gwd_mock_settings_writable.cpp (+296/-0)
gtk/window-decorator/tests/compiz_gwd_mock_settings_writable.h (+108/-0)
gtk/window-decorator/tests/compiz_gwd_tests.h.in (+31/-0)
gtk/window-decorator/tests/org.gnome.desktop.wm.preferences.gschema.xml (+72/-0)
gtk/window-decorator/tests/org.gnome.mutter.gschema.xml (+18/-0)
gtk/window-decorator/tests/test_gwd_settings.cpp (+1653/-0)
gtk/window-decorator/wnck.c (+4/-1)
include/core/CMakeLists.txt (+0/-1)
include/core/screen.h (+9/-9)
include/core/serialization.h (+0/-158)
include/decoration.h (+4/-0)
kde/window-decorator-kde4/CMakeLists.txt (+6/-3)
kde/window-decorator-kde4/decorator.cpp (+11/-4)
kde/window-decorator-kde4/decorator.h (+5/-5)
kde/window-decorator-kde4/main.cpp (+1/-1)
kde/window-decorator-kde4/window.cpp (+66/-0)
kde/window-decorator-kde4/window.h (+13/-0)
libdecoration/decoration.c (+12/-1)
plugins/addhelper/VERSION (+0/-1)
plugins/addhelper/src/addhelper.cpp (+0/-23)
plugins/addhelper/src/addhelper.h (+0/-23)
plugins/animation/VERSION (+0/-1)
plugins/animation/animation.xml.in (+2/-2)
plugins/animation/include/animation/animation.h (+4/-3)
plugins/animation/include/animation/animeffect.h (+1/-1)
plugins/animation/src/animation.cpp (+27/-19)
plugins/animation/src/grid.cpp (+8/-11)
plugins/animation/src/options.cpp (+11/-4)
plugins/animation/src/private.h (+1/-1)
plugins/animationaddon/VERSION (+0/-1)
plugins/animationaddon/src/animationaddon.cpp (+3/-0)
plugins/animationaddon/src/polygon.cpp (+2/-2)
plugins/animationaddon/src/private.h (+1/-1)
plugins/annotate/src/annotate.cpp (+1/-15)
plugins/annotate/src/annotate.h (+1/-18)
plugins/bench/VERSION (+0/-1)
plugins/bench/src/bench.cpp (+2/-12)
plugins/bench/src/bench.h (+0/-2)
plugins/bicubic/VERSION (+0/-1)
plugins/blur/src/blur.cpp (+7/-1)
plugins/blur/src/blur.h (+4/-4)
plugins/ccp/src/ccp.cpp (+2/-2)
plugins/colorfilter/VERSION (+0/-1)
plugins/colorfilter/src/colorfilter.cpp (+0/-10)
plugins/colorfilter/src/colorfilter.h (+0/-20)
plugins/commands/commands.xml.in (+63/-63)
plugins/compiztoolbox/CMakeLists.txt (+1/-1)
plugins/compiztoolbox/include/compiztoolbox/compiztoolbox.h (+2/-2)
plugins/compiztoolbox/src/compiztoolbox.cpp (+3/-0)
plugins/copytex/src/copytex.cpp (+3/-0)
plugins/copytex/src/copytex.h (+2/-2)
plugins/crashhandler/VERSION (+0/-1)
plugins/cubeaddon/VERSION (+0/-1)
plugins/cubeaddon/src/cubeaddon.cpp (+10/-0)
plugins/cubeaddon/src/cubeaddon.h (+9/-9)
plugins/dbus/src/dbus.h (+4/-4)
plugins/decor/src/decor.h (+3/-3)
plugins/expo/VERSION (+0/-1)
plugins/expo/src/expo.cpp (+1/-1)
plugins/extrawm/VERSION (+0/-1)
plugins/ezoom/VERSION (+0/-1)
plugins/ezoom/src/ezoom.cpp (+0/-29)
plugins/ezoom/src/ezoom.h (+0/-32)
plugins/fadedesktop/VERSION (+0/-1)
plugins/firepaint/VERSION (+0/-1)
plugins/firepaint/src/firepaint.cpp (+2/-43)
plugins/firepaint/src/firepaint.h (+1/-67)
plugins/gears/VERSION (+0/-1)
plugins/grid/VERSION (+0/-1)
plugins/grid/src/grid.h (+1/-1)
plugins/group/VERSION (+0/-1)
plugins/group/src/glow.cpp (+10/-0)
plugins/group/src/glow.h (+9/-9)
plugins/group/src/group.cpp (+3/-1)
plugins/group/src/group.h (+2/-25)
plugins/group/src/init.cpp (+0/-71)
plugins/group/src/tab.cpp (+1/-1)
plugins/imgjpeg/VERSION (+0/-1)
plugins/imgpng/src/imgpng.cpp (+2/-0)
plugins/imgpng/src/imgpng.h (+1/-1)
plugins/imgsvg/CMakeLists.txt (+1/-1)
plugins/kdecompat/VERSION (+0/-1)
plugins/loginout/VERSION (+0/-1)
plugins/mag/VERSION (+0/-1)
plugins/mag/src/mag.cpp (+0/-16)
plugins/mag/src/mag.h (+0/-14)
plugins/maximumize/VERSION (+0/-1)
plugins/maximumize/src/maximumize.cpp (+4/-0)
plugins/maximumize/src/maximumize.h (+3/-3)
plugins/mblur/VERSION (+0/-1)
plugins/mblur/src/mblur.cpp (+0/-10)
plugins/mblur/src/mblur.h (+0/-10)
plugins/mousepoll/VERSION (+0/-1)
plugins/mousepoll/src/mousepoll.cpp (+3/-0)
plugins/mousepoll/src/private.h (+2/-2)
plugins/move/src/move.cpp (+5/-0)
plugins/move/src/move.h (+3/-3)
plugins/neg/VERSION (+0/-1)
plugins/neg/src/neg.cpp (+0/-16)
plugins/neg/src/neg.h (+0/-11)
plugins/notification/src/notification.cpp (+3/-1)
plugins/notification/src/notification.h (+1/-1)
plugins/obs/src/obs.cpp (+4/-13)
plugins/obs/src/obs.h (+5/-15)
plugins/opacify/VERSION (+0/-1)
plugins/opacify/src/opacify.cpp (+2/-12)
plugins/opacify/src/opacify.h (+1/-12)
plugins/opengl/CMakeLists.txt (+6/-3)
plugins/opengl/DRIVERS (+54/-0)
plugins/opengl/include/opengl/opengl.h (+7/-7)
plugins/opengl/src/fsregion/CMakeLists.txt (+7/-0)
plugins/opengl/src/fsregion/fsregion.cpp (+54/-0)
plugins/opengl/src/fsregion/fsregion.h (+57/-0)
plugins/opengl/src/fsregion/tests/CMakeLists.txt (+10/-0)
plugins/opengl/src/fsregion/tests/test-fsregion.cpp (+140/-0)
plugins/opengl/src/opengl.cpp (+10/-0)
plugins/opengl/src/paint.cpp (+46/-23)
plugins/opengl/src/programcache.cpp (+2/-2)
plugins/opengl/src/vertexbuffer.cpp (+2/-2)
plugins/place/src/place.cpp (+12/-9)
plugins/place/src/smart/src/smart.cpp (+3/-3)
plugins/put/VERSION (+0/-1)
plugins/put/src/put.cpp (+4/-4)
plugins/reflex/VERSION (+0/-1)
plugins/resize/src/logic/include/resize-defs.h (+2/-2)
plugins/resize/src/logic/src/resize-logic.cpp (+7/-4)
plugins/resize/src/logic/tests/test-logic.cpp (+52/-0)
plugins/resizeinfo/VERSION (+0/-1)
plugins/resizeinfo/src/resizeinfo.cpp (+5/-0)
plugins/resizeinfo/src/resizeinfo.h (+3/-3)
plugins/ring/VERSION (+0/-1)
plugins/ring/src/ring.cpp (+4/-0)
plugins/ring/src/ring.h (+2/-2)
plugins/rotate/src/rotate.cpp (+1/-1)
plugins/scaleaddon/VERSION (+0/-1)
plugins/scaleaddon/src/scaleaddon.cpp (+1/-1)
plugins/scalefilter/VERSION (+0/-1)
plugins/session/VERSION (+0/-1)
plugins/shelf/VERSION (+0/-1)
plugins/shelf/src/shelf.cpp (+2/-0)
plugins/shelf/src/shelf.h (+1/-1)
plugins/shift/VERSION (+0/-1)
plugins/shift/src/shift.cpp (+2/-0)
plugins/shift/src/shift.h (+1/-1)
plugins/showdesktop/VERSION (+0/-1)
plugins/showdesktop/src/showdesktop.cpp (+5/-0)
plugins/showdesktop/src/showdesktop.h (+4/-4)
plugins/showmouse/VERSION (+0/-1)
plugins/showmouse/src/showmouse.cpp (+0/-40)
plugins/showmouse/src/showmouse.h (+0/-51)
plugins/showrepaint/VERSION (+0/-1)
plugins/showrepaint/src/showrepaint.cpp (+0/-8)
plugins/showrepaint/src/showrepaint.h (+0/-12)
plugins/snap/VERSION (+0/-1)
plugins/splash/VERSION (+0/-1)
plugins/splash/src/splash.cpp (+3/-0)
plugins/splash/src/splash.h (+2/-2)
plugins/stackswitch/VERSION (+0/-1)
plugins/staticswitcher/VERSION (+0/-1)
plugins/staticswitcher/src/staticswitcher.cpp (+3/-0)
plugins/staticswitcher/src/staticswitcher.h (+2/-2)
plugins/switcher/src/switcher.cpp (+6/-0)
plugins/switcher/src/switcher.h (+4/-4)
plugins/td/VERSION (+0/-1)
plugins/td/src/3d.cpp (+2/-0)
plugins/td/src/3d.h (+1/-1)
plugins/text/VERSION (+0/-1)
plugins/text/src/text.cpp (+1/-1)
plugins/thumbnail/VERSION (+0/-1)
plugins/thumbnail/src/thumbnail.cpp (+2/-0)
plugins/thumbnail/src/thumbnail.h (+1/-1)
plugins/titleinfo/VERSION (+0/-1)
plugins/trailfocus/VERSION (+0/-1)
plugins/trip/VERSION (+0/-1)
plugins/vpswitch/VERSION (+0/-1)
plugins/wall/VERSION (+0/-1)
plugins/wall/src/wall.cpp (+4/-4)
plugins/wallpaper/VERSION (+0/-1)
plugins/water/src/water.cpp (+5/-1)
plugins/water/src/water.h (+2/-2)
plugins/widget/VERSION (+0/-1)
plugins/winrules/VERSION (+0/-1)
plugins/wobbly/src/wobbly.h (+1/-1)
plugins/workarounds/VERSION (+0/-1)
postinst/convert-files/compiz-profile-Default.convert (+0/-60)
postinst/convert-files/compiz-profile-active-Default.convert (+0/-60)
postinst/convert-files/compiz-profile-independent-keys.convert (+59/-0)
postinst/migration-scripts/03_migrate_profile_independent.py (+44/-0)
src/event.cpp (+3/-3)
src/screen.cpp (+5/-5)
src/timer/src/timer.cpp (+1/-1)
tests/manual/Unredirect.txt (+77/-0)
To merge this branch: bzr merge lp:~timo-jyrinki/compiz/ubuntu.0982
Reviewer Review Type Date Requested Status
Ubuntu branches 2012-09-11 Pending
Review via email: mp+123693@code.launchpad.net

Description of the change

Packaging for 0.9.8.2 + lp:~timo-jyrinki/compiz/migrate-profile-independent

Includes also lp:~smspillaz/compiz/ubuntu.fix_1047067 and fixes co-installability of compiz-dev and python-compizconfig.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'AUTHORS'
2--- AUTHORS 2012-05-16 17:40:13 +0000
3+++ AUTHORS 2012-09-11 08:44:21 +0000
4@@ -1,52 +1,63 @@
5 Adam Williamson <awilliam@redhat.com>
6 Adel Gadllah <adel.gadllah@gmail.com>
7+Alan Bell <alanbell@ubuntu.com>
8 Alan Griffiths <alan.griffiths@canonical.com>
9 Alan Griffiths <alan@octopull.co.uk>
10+Alexandros Frantzis <alexandros.frantzis@linaro.org>
11 Alyssa Hung <deciare@isisview.org>
12+Andrea Azzarone <aazarone@gmail.com>
13 Andrea Azzarone <azzaronea@gmail.com>
14 Bellegarde Cedric <gnumdk@gmail.com>
15 Bellegarde Cedric <gnumdk@puffy.homelinux.org>
16 Bryan Nguyen <bnguyen@nvidia.com>
17+Cedric <gnumdk@gmail.com>
18 C-F Language team <i18n@opencompositing.org>
19-Cedric <gnumdk@gmail.com>
20 Christopher Williams <christopherw@verizon.net>
21 Christopher Williams <crdlb@compiz-fusion.org>
22+compiz <compiz@opencompositing.org>
23 Compiz Fusion l10n team <i18n@opencompositing.org>
24-Dan Winship <danw@novell.com>
25-Dan Winship <danw@twelve-monkeys.boston.ximian.com>
26+Daniel d'Andrada <daniel.dandrada@canonical.com>
27 Daniel Lea <danlea@gmail.com>
28 Daniel Nylander <po@danielnylander.se>
29+Daniel van Vugt <daniel.van.vugt@canonical.com>
30 Daniel van Vugt <vanvugt@gmail.com>
31 Danny Baumann <daba@mobilrechner.localdomain>
32 Danny Baumann <daba@rechenknecht.peppercon.de>
33 Danny Baumann <dannybaumann@web.de>
34+Dan Winship <danw@novell.com>
35+Dan Winship <danw@twelve-monkeys.boston.ximian.com>
36 David Reveman <c99drn@cs.umu.se>
37 David Reveman <david@ion.(none)>
38 David Reveman <davidr@novell.com>
39 Dennis Kasprzyk <onestone@beryl-project.org>
40 Dennis Kasprzyk <onestone@compiz-fusion.org>
41 Dennis Kasprzyk <onestone@opencompositing.org>
42+Didier Roche <didier.roche@canonical.com>
43 Didier Roche <didrocks@ubuntu.com>
44 Diogo Ferreira <diogo@underdev.org>
45 Dominique Leuenberger <dimstar@opensuse.org>
46 Dominique Leuenberger <dominique@leuenberger.net>
47 Dominique Leuenberger <dominique@messiah.leuenberger.net>
48+dragoran <drago01@gmail.com>
49 Eduardo Gurgel Pinho <eduardo@mad4.Chagas>
50 Erkin Bahceci <erkinbah@gmail.com>
51 Gabor Kelemen <kelemeng@ubuntu.com>
52+gandalfn <gandalfn@club-internet.fr>
53 Gerd Kohlberger <lowfi@chello.at>
54 Guillaume <ixcemix@gmail.com>
55 Guillaume Seguin <guillaume@segu.in>
56+G. Uitslag <klapinklapin@gmail.com>
57 James Jones <jajones@jatest.nvidia.com>
58 Jason Smith <jason.smith@canonical.com>
59 Jay Catherwood <jay.catherwood@gmail.com>
60 Jeremy C. Reed <reed@reedmedia.net>
61 Jigish Gohil <cyberorg@opensuse.org name = Jigish Gohil>
62 Jigish Gohil <cyberorg@prime.cyberorg.info>
63+Joel Bosveld <joel.bosveld@gmail.com>
64 Joel Bosveld <Joel.Bosveld@gmail.com>
65-Joel Bosveld <joel.bosveld@gmail.com>
66 Julian Sikorski <lordzanon@poczta.onet.pl>
67 Jürgen Kreileder <jk@blackdown.de>
68+Keith Madill <sciso@hotmail.co.uk>
69 Kristian Hogsberg <krh@bitplanet.net>
70 Kristian Høgsberg <krh@redhat.com>
71 Kristian Lyngstol <kristian@beryl-project.org>
72@@ -54,11 +65,16 @@
73 Kristopher Ives <kris@leetbook2.(none)>
74 Kristopher Ives <kristopher.ives@gmail.com>
75 Lubos Lunak <llunak@novell.com>
76+Łukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com>
77+MC Return <mcr2010@mcr2010-HP-Compaq-dc7700-Convertible-Minitower>
78+MC Return <mc.return@gmx.net>
79 Michael Vogt <mvo@ubuntu.com>
80+mike@blueroot.co.uk <mike@blueroot.co.uk>
81 Mike Cook <mcook@novell.com>
82 Mike Dransfield <mike@blueroot.co.uk>
83 Mikkel Kamstrup Erlandsen <mikkel.kamstrup@canonical.com>
84 Mirco Muller <macslow@bangang.de>
85+moppsy <moppsy@comcast.net>
86 Nicolas Delvaux <contact@nicolas-delvaux.org>
87 Nicolas Viennot <nicolas@viennot.biz>
88 Owen W. Taylor <otaylor@fishsoup.net>
89@@ -69,42 +85,46 @@
90 Quinn Storm <livinglatexkali@gmail.com>
91 Quinn Storm <quinn@quinn-laptop.(none)>
92 Randolph Chung <randolph@tausq.org>
93-Rob Taylor <rob.taylor@codethink.co.uk>
94+Renato Araujo Oliveira Filho <renato.filho@canonical.com>
95 Robert Ancell <robert.ancell@canonical.com>
96 Robert Carr <racarr@gorbie.(none)>
97 Robert Carr <robb@gorbachev.(none)>
98 Robert Noland <rnoland@rnoland-ibm.acs.internap.com>
99+Rob Taylor <rob.taylor@codethink.co.uk>
100+Rock <rockbuntu@mailinator.com>
101 Roi Cohen <racarr@gorbie.(none)>
102 Roi Cohen <roico.beryl@gmail.com>
103 Roland Baer <roland@Vista.(none)>
104 Roland Bar <roland@verifysoft.de>
105+Roland Bär <roland@verifysoft.de>
106 Roland Bär <roland@Vista.(none)>
107-Roland Bär <roland@verifysoft.de>
108 Sam <smspillaz@gmail.com>
109+Sam Spilsbury <sam.spilsbury@canonical.com>
110 Sam Spilsbury <Sam@XPS-SUSE.site>
111+Sam Spilsbury <smspillaz@gmail.com>
112 Sam Spilsbury <SmSpillaz@gmail.com>
113-Sam Spilsbury <sam.spilsbury@canonical.com>
114+Sam Spilsbury <smspillaz@smspillaz-desktop.(none)>
115 Sam Spilsbury <smspillaz@XPS-FEDORA.(none)>
116 Sam Spilsbury <smspillaz@XPS-U.(none)>
117-Sam Spilsbury <smspillaz@gmail.com>
118-Sam Spilsbury <smspillaz@smspillaz-desktop.(none)>
119 Scott Moreau <oreaus@gmail.com>
120+scott <scott@box1.localdomain>
121 Sebasian Billaudelle <stein@cream-project.org>
122+Sebastien Bacher <seb128@ubuntu.com>
123+smspillaz <sam.spilsbury@canonical.com>
124+Søren Sandmann <sandmann@redhat.com>
125 Steven Robertson <nihilismwow@gmail.com>
126 Stjepan Glavina <stjepang@gmail.com>
127-Søren Sandmann <sandmann@redhat.com>
128 Thierry Reding <thierry@gilfi.de>
129+Thomas Thurman <thomas.thurman@canonical.com>
130+Thomas Voß
131 Thomas Voss <thomas.voss@canonical.com>
132+Time Penhey <tim.penhey@canonical.com>
133+timo.jyrinki@canonical.com
134 Tim Penhey <tim.penhey@canonical.com>
135-Time Penhey <tim.penhey@canonical.com>
136 Tomas Carnecky <tom@dbservice.com>
137 Travis Watkins <amaranth@ubuntu.com>
138+Ugo Riboni <ugo.riboni@canonical.com>
139 Unity <unity@VB-U1010.(none)>
140 Ville Syrjala <syrjala@sci.fi>
141 Zack Rusin <zack@kde.org>
142-dragoran <drago01@gmail.com>
143-gandalfn <gandalfn@club-internet.fr>
144-mike@blueroot.co.uk <mike@blueroot.co.uk>
145-moppsy <moppsy@comcast.net>
146-scott <scott@box1.localdomain>
147 Δημήτρης (djdoo) <jimdusis@yahoo.gr>
148
149=== modified file 'CMakeLists.txt'
150--- CMakeLists.txt 2012-08-24 13:41:00 +0000
151+++ CMakeLists.txt 2012-09-11 08:44:21 +0000
152@@ -86,8 +86,6 @@
153 set (ALL_LINGUAS af ar bg bn bn_IN bs ca cs cy da de el en_GB en_US es eu et fi fr gl gu he hi hr hu id it ja ka km ko lo lt mk mr nb nl or pa pl pt pt_BR ro ru sk sl sr sv ta tr uk vi xh zh_CN zh_TW zu)
154 set (GETTEXT_PACKAGE compiz)
155
156-find_package (Boost 1.34.0 REQUIRED serialization)
157-
158 set (COMPIZ_REQUIRES
159 x11
160 xext
161@@ -112,12 +110,8 @@
162 compiz_pkg_check_modules (COMPIZ REQUIRED ${COMPIZ_REQUIRES})
163 compiz_pkg_check_modules (LIBDECORATION REQUIRED ${DECORATION_REQUIRES})
164
165-list (APPEND COMPIZ_LIBRARIES ${Boost_LIBRARIES})
166-
167 include (CompizDefaults)
168
169-set (COMPIZ_CFLAGS "${COMPIZ_CFLAGS} -I${Boost_INCLUDE_DIR}")
170-
171 set (_compiz_package_string "Compiz ${VERSION}")
172 set (_compiz_package "Compiz")
173
174
175=== modified file 'NEWS'
176--- NEWS 2012-08-23 07:09:48 +0000
177+++ NEWS 2012-09-11 08:44:21 +0000
178@@ -1,3 +1,60 @@
179+Release 0.9.8.2 (2012-09-10 Daniel van Vugt <daniel.van.vugt@canonical.com>)
180+============================================================================
181+
182+Highlights
183+
184+ * gtk-window-decorator has been fully ported from GConf to GSettings.
185+ * Gamers rejoice! CCSM > Composite > "Unredirect Fullscreen Windows" now
186+ works more reliably, with a few bugs remaining. If you turn it on then
187+ fullscreen windows like games will get direct rendering access and won't
188+ be slowed by Compiz (or Unity) any more.
189+
190+Bugs Fixed (https://launchpad.net/compiz/+milestone/0.9.8.2)
191+
192+ 956986 - compiz crashed with SIGSEGV when imgsvg is loaded, in
193+ getCompPluginVTable20090315_imgsvg() from dlloaderLoadPlugin()
194+ from CompPlugin::load()
195+ 974242 - Compiz is moving windows against my will
196+ 976032 - Place plugin problem with panel in fullscreen and gnome classic
197+ 980663 - Compiz won't start if "unredirect fullscreen windows" is enabled
198+ 1014986 - [performance] compiz is wasting CPU responding to repaint
199+ requests for offscreen windows
200+ 1024214 - Tests can disappear from make test when CMake regenerates
201+ CTestTestfile.cmake
202+ 1040081 - [regression] Week 34: Ctrl+Alt+T shortcut (open terminal) fails
203+ to work
204+ 1040455 - Setting the UnMinimize animation is ignored (default animation
205+ still used)
206+ 1041047 - Unredirect Fullscreen Windows stay on top (unredirected) even
207+ when they're not on top any more (or the output is transformed)
208+ 1041066 - Unredirect Fullscreen Windows sometimes fails to unredirect
209+ fullscreen windows at all
210+ 1041310 - compiz 0.9.8.0 rev3321 fails to build on kde4-window-decorator
211+ 1042095 - AUTHORS is out of date in compiz-0.9.8.0. Needs to be updated
212+ from the bzr log.
213+ 1043143 - Unresolved symbols in plugins are not detected at build time,
214+ instead cause cryptic crashes in COMPIZ_PLUGIN_20090315()
215+ 1045191 - compiz crashed with SIGABRT in assert from
216+ boost::shared_ptr<CompRect>::operator-> from
217+ ResizeLogic::enableOrDisableVerticalMaximization() from
218+ ResizeLogic::handleMotionEvent()
219+ 1045235 - Compiz crashed with SIGFPE in addQuads()
220+ [plugins/opengl/src/paint.cpp:839]
221+ 1045652 - UnMinimize should be spelled "Unminimize"
222+ 1045665 - CMake Error at cmake/EnableCoverageReport.cmake:69
223+ (SET_TARGET_PROPERTIES): set_target_properties Can not find
224+ target to add properties to:
225+ compizconfig_ccs_settings_upgrade_internal
226+ 1046184 - __pyx_f_12compizconfing_ListToStringList defined but not used
227+ 1046190 - Migration to gsettings doesn't migrate compiz/unity configurable
228+ keys to g-c-c and those keys doesn't work
229+ 1046199 - Changing a key to org.compiz.integrated schema doesn't impact
230+ the current profile
231+ 1046212 - show-hud integration does not work
232+ 1046661 - Unredirect Fullscreen Windows stay on top (unredirected) even
233+ when an RGBA window is stacked above it
234+
235+
236 Release 0.9.8.0 (2012-08-23 Daniel van Vugt <daniel.van.vugt@canonical.com>)
237 ============================================================================
238
239
240=== modified file 'VERSION'
241--- VERSION 2012-08-23 04:26:34 +0000
242+++ VERSION 2012-09-11 08:44:21 +0000
243@@ -1,1 +1,1 @@
244-0.9.8.0
245+0.9.8.2
246
247=== modified file 'cmake/CompizCommon.cmake'
248--- cmake/CompizCommon.cmake 2012-08-22 01:21:08 +0000
249+++ cmake/CompizCommon.cmake 2012-09-11 08:44:21 +0000
250@@ -40,7 +40,7 @@
251 )
252
253 # Almost everything is a shared library now, so almost everything needs -fPIC
254-set (COMMON_FLAGS "-fPIC -Wall")
255+set (COMMON_FLAGS "-fPIC -Wall -Wl,-zdefs")
256
257 option (COMPIZ_DEPRECATED_WARNINGS "Warn about declarations marked deprecated" OFF)
258 if (NOT COMPIZ_DEPRECATED_WARNINGS)
259
260=== modified file 'cmake/CompizGSettings.cmake'
261--- cmake/CompizGSettings.cmake 2012-07-29 03:23:28 +0000
262+++ cmake/CompizGSettings.cmake 2012-09-11 08:44:21 +0000
263@@ -63,6 +63,7 @@
264 find_program (PKG_CONFIG_TOOL pkg-config)
265 find_program (GLIB_COMPILE_SCHEMAS glib-compile-schemas)
266 mark_as_advanced (FORCE PKG_CONFIG_TOOL)
267+ mark_as_advanced (GLIB_COMPILE_SCHEMAS)
268
269 # find out where schemas need to go if we are installing them systemwide
270 execute_process (COMMAND ${PKG_CONFIG_TOOL} glib-2.0 --variable prefix OUTPUT_VARIABLE GSETTINGS_GLIB_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
271@@ -107,12 +108,16 @@
272
273 function (add_gsettings_schema_to_recompilation_list _target_name_for_schema)
274
275+ find_program (GLIB_COMPILE_SCHEMAS glib-compile-schemas)
276+ mark_as_advanced (GLIB_COMPILE_SCHEMAS)
277+
278 get_property (GSETTINGS_LOCAL_COMPILE_TARGET_SET
279 GLOBAL
280 PROPERTY GSETTINGS_LOCAL_COMPILE_TARGET_SET
281 SET)
282
283- if (NOT GSETTINGS_LOCAL_COMPILE_TARGET_SET)
284+ if (NOT GSETTINGS_LOCAL_COMPILE_TARGET_SET AND
285+ GLIB_COMPILE_SCHEMAS)
286
287 add_custom_command (OUTPUT ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/gschemas.compiled
288 COMMAND ${GLIB_COMPILE_SCHEMAS} --targetdir=${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/
289@@ -127,7 +132,8 @@
290 PROPERTY GSETTINGS_LOCAL_COMPILE_TARGET_SET
291 TRUE)
292
293- endif (NOT GSETTINGS_LOCAL_COMPILE_TARGET_SET)
294+ endif (NOT GSETTINGS_LOCAL_COMPILE_TARGET_SET AND
295+ GLIB_COMPILE_SCHEMAS)
296
297 add_dependencies (compiz_gsettings_compile_local
298 ${_target_name_for_schema})
299
300=== modified file 'cmake/CompizPlugin.cmake'
301--- cmake/CompizPlugin.cmake 2012-05-26 10:52:26 +0000
302+++ cmake/CompizPlugin.cmake 2012-09-11 08:44:21 +0000
303@@ -75,8 +75,6 @@
304
305 ### Set up core lib dependences so this in correctly imported into plugins
306
307-find_package (Boost 1.34.0 REQUIRED serialization)
308-
309 set (COMPIZ_REQUIRES
310 x11
311 xext
312@@ -94,7 +92,6 @@
313 )
314
315 compiz_pkg_check_modules (COMPIZ REQUIRED ${COMPIZ_REQUIRES})
316-
317 list (APPEND COMPIZ_LIBRARIES ${Boost_LIBRARIES})
318
319 # determinate installation directories
320
321=== modified file 'cmake/FindCompiz.cmake'
322--- cmake/FindCompiz.cmake 2012-08-21 10:11:51 +0000
323+++ cmake/FindCompiz.cmake 2012-09-11 08:44:21 +0000
324@@ -1,11 +1,8 @@
325-
326-
327-
328 ################################################################################
329 #
330 # FindCompiz
331 #
332-# This module finds Compiz (www.compiz.org). It uses the FindPkgConfig to
333+# This module finds Compiz (https://launchpad.net/compiz). It uses the FindPkgConfig to
334 # locate Compiz and adds the Compiz CMake module path to the CMake module path.
335 # It also loads the CompizDefaults that sets all variables to compile Compiz
336 # modules.
337
338=== modified file 'compizconfig/ccsm/CMakeLists.txt'
339--- compizconfig/ccsm/CMakeLists.txt 2012-05-27 14:25:30 +0000
340+++ compizconfig/ccsm/CMakeLists.txt 2012-09-11 08:44:21 +0000
341@@ -4,11 +4,6 @@
342 # Hack
343 set (CMAKE_PROJECT_NAME ccsm)
344
345-file (READ ${CMAKE_CURRENT_SOURCE_DIR}/VERSION COMPIZ_RELEASE_VERSION LIMIT 12 OFFSET 0)
346-string (STRIP ${COMPIZ_RELEASE_VERSION} COMPIZ_RELEASE_VERSION)
347-
348-set (VERSION ${COMPIZ_RELEASE_VERSION})
349-
350 add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/compizconfig_wrapper.c
351 COMMAND echo \"int main (void) { return 0\; }\" >> ${CMAKE_CURRENT_BINARY_DIR}/compizconfig_wrapper.c
352 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
353@@ -36,14 +31,17 @@
354 ${CMAKE_CURRENT_BINARY_DIR}/build/${PY_BUILD_DIR}/ccm/Window.py
355 ${CMAKE_CURRENT_BINARY_DIR}/build/${PY_SCRIPTS_DIR}/ccsm)
356
357+file (READ ${CMAKE_SOURCE_DIR}/VERSION COMPIZ_RELEASE_VERSION LIMIT 12 OFFSET 0)
358+string (STRIP ${COMPIZ_RELEASE_VERSION} COMPIZ_RELEASE_VERSION)
359+set (VERSION ${COMPIZ_RELEASE_VERSION})
360+
361 add_custom_command (OUTPUT ${PY_CCSM_LIB}
362- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/setup.py build --build-base=${CMAKE_CURRENT_BINARY_DIR}/build
363+ COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/setup.py build --build-base=${CMAKE_CURRENT_BINARY_DIR}/build --version=${VERSION}
364 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
365 COMMENT "Generating Python Bytecode")
366
367-add_library (ccsm_wrapper
368- ${CMAKE_CURRENT_BINARY_DIR}/compizconfig_wrapper.c
369- ${PY_CCSM_LIB})
370+add_custom_target (ccsm_module ALL DEPENDS
371+ ${PY_CCSM_LIB})
372
373 add_custom_target (uninstall
374 COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/setup.py uninstall --prefix=${CMAKE_INSTALL_PREFIX}
375@@ -52,6 +50,6 @@
376
377 install (CODE
378 "message (\"Installing python files\")
379- execute_process (COMMAND cmake -DSETUP=${CMAKE_CURRENT_SOURCE_DIR}/setup.py -DPREFIX=${CMAKE_INSTALL_PREFIX} -DWDIR=${CMAKE_CURRENT_SOURCE_DIR} -P ${compiz_SOURCE_DIR}/compizconfig/cmake/exec_setup_py_with_destdir.cmake)")
380+ execute_process (COMMAND cmake -DSETUP=${CMAKE_CURRENT_SOURCE_DIR}/setup.py -DPREFIX=${CMAKE_INSTALL_PREFIX} -DWDIR=${CMAKE_CURRENT_SOURCE_DIR} -DVERSION=${VERSION} -P ${compiz_SOURCE_DIR}/compizconfig/cmake/exec_setup_py_with_destdir.cmake)")
381
382
383
384=== removed file 'compizconfig/ccsm/VERSION'
385--- compizconfig/ccsm/VERSION 2012-05-16 17:44:14 +0000
386+++ compizconfig/ccsm/VERSION 1970-01-01 00:00:00 +0000
387@@ -1,1 +0,0 @@
388-0.9.5.94
389
390=== modified file 'compizconfig/ccsm/ccm/Widgets.py'
391--- compizconfig/ccsm/ccm/Widgets.py 2011-02-12 18:24:14 +0000
392+++ compizconfig/ccsm/ccm/Widgets.py 2012-09-11 08:44:21 +0000
393@@ -1335,7 +1335,7 @@
394 if IconTheme.lookup_icon("ccsm", 64, 0):
395 icon = IconTheme.load_icon("ccsm", 64, 0)
396 self.set_logo (icon)
397- self.set_website ("http://www.compiz-fusion.org")
398+ self.set_website ("https://launchpad.net/compiz")
399
400 # Error dialog
401 #
402
403=== modified file 'compizconfig/ccsm/setup.py'
404--- compizconfig/ccsm/setup.py 2012-05-16 17:44:14 +0000
405+++ compizconfig/ccsm/setup.py 2012-09-11 08:44:21 +0000
406@@ -5,12 +5,35 @@
407 from stat import *
408 from distutils.core import setup
409 from distutils.command.install import install as _install
410+from distutils.command.build import build as _build
411 from distutils.command.install_data import install_data as _install_data
412
413 INSTALLED_FILES = "installed_files"
414
415+class build (_build):
416+
417+ user_options = _build.user_options[:]
418+ user_options.extend ([('version=', None, "Version of the package")])
419+
420+ def initialize_options(self):
421+ self.version = None
422+ _build.initialize_options (self)
423+
424+ def finalize_options(self):
425+ _build.finalize_options (self)
426+
427 class install (_install):
428
429+ user_options = _install.user_options[:]
430+ user_options.extend ([('version=', None, "Version of the package")])
431+
432+ def initialize_options(self):
433+ self.version = None
434+ _install.initialize_options (self)
435+
436+ def finalize_options(self):
437+ _install.finalize_options (self)
438+
439 def run (self):
440 _install.run (self)
441 outputs = self.get_outputs ()
442@@ -97,16 +120,15 @@
443 if sys.argv[1] in ("install", "uninstall") and len (prefix):
444 sys.argv += ["--prefix", prefix]
445
446-version_file = open ("VERSION", "r")
447-version = version_file.read ().strip ()
448-if "=" in version:
449- version = version.split ("=")[1]
450+for arg in sys.argv:
451+ if "--version" in arg:
452+ VERSION = arg.split ("=")[1]
453
454 f = open (os.path.join ("ccm/Constants.py.in"), "rt")
455 data = f.read ()
456 f.close ()
457 data = data.replace ("@prefix@", prefix)
458-data = data.replace ("@version@", version)
459+data = data.replace ("@version@", VERSION)
460 f = open (os.path.join ("ccm/Constants.py"), "wt")
461 f.write (data)
462 f.close ()
463@@ -168,16 +190,17 @@
464
465 setup (
466 name = "ccsm",
467- version = version,
468+ version = VERSION,
469 description = "CompizConfig Settings Manager",
470 author = "Patrick Niklaus",
471 author_email = "marex@opencompositing.org",
472- url = "http://www.compiz.org/",
473+ url = "https://launchpad.net/compiz",
474 license = "GPL",
475 data_files = data_files,
476 packages = ["ccm"],
477 scripts = ["ccsm"],
478- cmdclass = {"uninstall" : uninstall,
479+ cmdclass = {"build" : build,
480+ "uninstall" : uninstall,
481 "install" : install,
482 "install_data" : install_data}
483 )
484
485=== modified file 'compizconfig/cmake/exec_setup_py_with_destdir.cmake'
486--- compizconfig/cmake/exec_setup_py_with_destdir.cmake 2012-06-30 07:53:38 +0000
487+++ compizconfig/cmake/exec_setup_py_with_destdir.cmake 2012-09-11 08:44:21 +0000
488@@ -1,6 +1,7 @@
489 set (WDIR "" CACHE FORCE "Working Directory")
490 set (PREFIX "" CACHE FORCE "Prefix")
491 set (SETUP "" CACHE FORCE "Path to setup.py")
492+set (VERSION "" CACHE FORCE "Version")
493
494 set (EXTRAARGS "")
495 set (BUILD_DEB $ENV{COMPIZ_DEB_BUILD})
496@@ -20,5 +21,5 @@
497 set (EXTRAARGS "--install-layout=deb")
498 endif (BUILD_DEB)
499
500-execute_process (COMMAND python ${SETUP} install ${EXTRAARGS} --prefix=${PREFIX} ${INSTALL_ROOT_ARGS}
501+execute_process (COMMAND python ${SETUP} install ${EXTRAARGS} --prefix=${PREFIX} --version=${VERSION} ${INSTALL_ROOT_ARGS}
502 WORKING_DIRECTORY ${WDIR})
503
504=== modified file 'compizconfig/compizconfig-python/CMakeLists.txt'
505--- compizconfig/compizconfig-python/CMakeLists.txt 2012-08-16 09:11:10 +0000
506+++ compizconfig/compizconfig-python/CMakeLists.txt 2012-09-11 08:44:21 +0000
507@@ -4,11 +4,6 @@
508 # Hack
509 set (CMAKE_PROJECT_NAME compizconfig-python)
510
511-file (READ ${CMAKE_CURRENT_SOURCE_DIR}/VERSION COMPIZ_RELEASE_VERSION LIMIT 12 OFFSET 0)
512-string (STRIP ${COMPIZ_RELEASE_VERSION} COMPIZ_RELEASE_VERSION)
513-
514-set (VERSION ${COMPIZ_RELEASE_VERSION})
515-
516 add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/compizconfig_wrapper.c
517 COMMAND echo \"int main (void) { return 0\; }\" >> ${CMAKE_CURRENT_BINARY_DIR}/compizconfig_wrapper.c
518 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
519@@ -27,10 +22,6 @@
520 set (PY_SCRIPTS_DIR scripts-${PY_VERSION})
521
522 set (PY_COMPIZCONFIG_SRC ${CMAKE_CURRENT_BINARY_DIR}/compizconfig.c)
523-set (PY_COMPIZCONFIG_VERSION ${CMAKE_CURRENT_BINARY_DIR}/VERSION)
524-
525-add_custom_command (OUTPUT ${PY_COMPIZCONFIG_VERSION}
526- COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/VERSION ${CMAKE_CURRENT_BINARY_DIR}/VERSION)
527
528 add_custom_command (OUTPUT ${PY_COMPIZCONFIG_SRC}
529 COMMAND pyrexc -o ${PY_COMPIZCONFIG_SRC} ${CMAKE_CURRENT_SOURCE_DIR}/src/compizconfig.pyx
530@@ -38,27 +29,33 @@
531
532 set (PY_COMPIZCONFIG_LIB ${CMAKE_CURRENT_BINARY_DIR}/build/${PY_BUILD_DIR}/compizconfig.so)
533
534+file (READ ${CMAKE_SOURCE_DIR}/VERSION COMPIZ_RELEASE_VERSION LIMIT 12 OFFSET 0)
535+string (STRIP ${COMPIZ_RELEASE_VERSION} COMPIZ_RELEASE_VERSION)
536+set (VERSION ${COMPIZ_RELEASE_VERSION})
537+
538+configure_file (${CMAKE_CURRENT_SOURCE_DIR}/compizconfig-python.pc.in
539+ ${CMAKE_CURRENT_BINARY_DIR}/compizconfig-python.pc)
540+
541 add_custom_command (OUTPUT ${PY_COMPIZCONFIG_LIB}
542- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/setup.py build --build-base=${CMAKE_CURRENT_BINARY_DIR}/build
543+ COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/setup.py build --build-base=${CMAKE_CURRENT_BINARY_DIR}/build --version=${VERSION}
544 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
545- DEPENDS ${PY_COMPIZCONFIG_SRC} ${PY_COMPIZCONFIG_VERSION}
546+ DEPENDS ${PY_COMPIZCONFIG_SRC} ${PY_COMPIZCONFIG_VERSION} compizconfig
547 COMMENT "Generating Python Bytecode")
548
549-add_library (compizconfig_wrapper
550- ${CMAKE_CURRENT_BINARY_DIR}/compizconfig_wrapper.c
551- ${PY_COMPIZCONFIG_LIB})
552+add_custom_target (compizconfig_python_module ALL DEPENDS
553+ ${PY_COMPIZCONFIG_LIB})
554
555 add_custom_target (uninstall
556 COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/setup.py uninstall --prefix=${CMAKE_INSTALL_PREFIX}
557 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
558 COMMENT "Uninstalling Python Files")
559
560+install (FILES ${CMAKE_CURRENT_BINARY_DIR}/compizconfig-python.pc
561+ DESTINATION ${libdir}/pkgconfig)
562
563 install (CODE
564 "message (\"Installing python files\")
565- execute_process (COMMAND cmake -DSETUP=${CMAKE_CURRENT_SOURCE_DIR}/setup.py -DPREFIX=${CMAKE_INSTALL_PREFIX} -DWDIR=${CMAKE_CURRENT_BINARY_DIR} -P ${compiz_SOURCE_DIR}/compizconfig/cmake/exec_setup_py_with_destdir.cmake)")
566-
567-add_dependencies (compizconfig_wrapper compizconfig)
568+ execute_process (COMMAND cmake -DSETUP=${CMAKE_CURRENT_SOURCE_DIR}/setup.py -DPREFIX=${CMAKE_INSTALL_PREFIX} -DWDIR=${CMAKE_CURRENT_BINARY_DIR} -DVERSION=${VERSION} -P ${compiz_SOURCE_DIR}/compizconfig/cmake/exec_setup_py_with_destdir.cmake)")
569
570 if (COMPIZ_BUILD_TESTING)
571
572
573=== removed file 'compizconfig/compizconfig-python/VERSION'
574--- compizconfig/compizconfig-python/VERSION 2012-05-16 17:43:25 +0000
575+++ compizconfig/compizconfig-python/VERSION 1970-01-01 00:00:00 +0000
576@@ -1,1 +0,0 @@
577-0.9.5.94
578
579=== modified file 'compizconfig/compizconfig-python/compizconfig-python.pc.in'
580--- compizconfig/compizconfig-python/compizconfig-python.pc.in 2012-05-16 17:43:25 +0000
581+++ compizconfig/compizconfig-python/compizconfig-python.pc.in 2012-09-11 08:44:21 +0000
582@@ -5,8 +5,8 @@
583 pyexecdir=@pyexecdir@
584
585 Name: compizconfig-python
586+Version: @VERSION@
587 Description: Compiz configuration system bindings
588-Version: @VERSION@
589
590 Requires: @CCS_REQUIRES@
591 Libs: @CCS_LIBS@ -L@libdir@ -lcompizconfig
592
593=== modified file 'compizconfig/compizconfig-python/setup.py'
594--- compizconfig/compizconfig-python/setup.py 2012-08-16 09:11:10 +0000
595+++ compizconfig/compizconfig-python/setup.py 2012-09-11 08:44:21 +0000
596@@ -7,21 +7,14 @@
597 from distutils.extension import Extension
598 import os
599 import subprocess
600-
601+import sys
602 import unittest
603-import os
604-
605 pkg_config_environ = os.environ
606 pkg_config_environ["PKG_CONFIG_PATH"] = os.getcwd () + "/../libcompizconfig:" + os.environ.get ("PKG_CONFIG_PATH", '')
607
608 from distutils.command.build_ext import build_ext
609 ext_module_src = os.getcwd () + "/compizconfig.c"
610
611-version_file = open ("VERSION", "r")
612-version = version_file.read ().strip ()
613-if "=" in version:
614- version = version.split ("=")[1]
615-
616 def pkgconfig(*packages, **kw):
617 flag_map = {'-I': 'include_dirs', '-L': 'library_dirs', '-l': 'libraries', '-R': 'runtime_library_dirs'}
618 cmd = ['pkg-config', '--libs', '--cflags']
619@@ -38,7 +31,9 @@
620
621 return kw
622
623-VERSION_FILE = os.path.join (os.path.dirname (__file__), "VERSION")
624+for arg in sys.argv:
625+ if "--version" in arg:
626+ VERSION = arg.split ("=")[1]
627
628 pkgconfig_libs = subprocess.Popen (["pkg-config", "--libs", "libcompizconfig_internal"], stdout=subprocess.PIPE, env=pkg_config_environ, stderr=open(os.devnull, 'w')).communicate ()[0]
629
630@@ -50,8 +45,30 @@
631
632 INSTALLED_FILES = "installed_files"
633
634+class build (_build):
635+
636+ user_options = _build.user_options[:]
637+ user_options.extend ([('version=', None, "Version of the package")])
638+
639+ def initialize_options(self):
640+ self.version = None
641+ _build.initialize_options (self)
642+
643+ def finalize_options(self):
644+ _build.finalize_options (self)
645+
646 class install (_install):
647
648+ user_options = _install.user_options[:]
649+ user_options.extend ([('version=', None, "Version of the package")])
650+
651+ def initialize_options(self):
652+ self.version = None
653+ _install.initialize_options (self)
654+
655+ def finalize_options(self):
656+ _install.finalize_options (self)
657+
658 def run (self):
659 _install.run (self)
660 outputs = self.get_outputs ()
661@@ -132,15 +149,16 @@
662
663 setup (
664 name = "compizconfig-python",
665- version = version,
666+ version = VERSION,
667 description = "CompizConfig Python",
668- url = "http://www.compiz.org/",
669+ url = "https://launchpad.net/compiz",
670 license = "GPL",
671 maintainer = "Guillaume Seguin",
672 maintainer_email = "guillaume@segu.in",
673 cmdclass = {"uninstall" : uninstall,
674 "install" : install,
675 "install_data" : install_data,
676+ "build" : build,
677 "build_ext" : build_ext,
678 "test" : test},
679 ext_modules=[
680
681=== modified file 'compizconfig/compizconfig-python/src/compizconfig.pyx'
682--- compizconfig/compizconfig-python/src/compizconfig.pyx 2012-08-22 05:31:22 +0000
683+++ compizconfig/compizconfig-python/src/compizconfig.pyx 2012-09-11 08:44:21 +0000
684@@ -383,36 +383,6 @@
685 return ccsSettingGetInfo ((<CCSSetting *> value.parent)).forList.listType
686 else:
687 return ccsSettingGetType ((<CCSSetting *> value.parent))
688-
689-cdef CCSStringList * ListToStringList (object list):
690- if len (list) <= 0:
691- return NULL
692-
693- cdef CCSStringList * listStart
694- cdef CCSStringList * stringList
695- cdef CCSStringList * prev
696- cdef CCSString * stringStart
697-
698- stringStart = <CCSString *> malloc (sizeof (CCSString))
699-
700- stringStart.value = strdup (list[0])
701- listStart = <CCSStringList *> malloc (sizeof (CCSStringList))
702- listStart.data = <CCSString *> stringStart
703- listStart.next = NULL
704- prev = listStart
705-
706- for l in list[1:]:
707- stringStart = <CCSString *> malloc (sizeof (CCSString))
708-
709- stringStart.value = <char *> strdup (l)
710-
711- stringList = <CCSStringList *> malloc (sizeof (CCSStringList))
712- stringList.data = stringStart
713- stringList.next = NULL
714- prev.next = stringList
715- prev = stringList
716-
717- return listStart
718
719 cdef object StringListToList (CCSList * stringList):
720 cdef CCSString * string
721
722=== removed file 'compizconfig/gconf/VERSION'
723--- compizconfig/gconf/VERSION 2012-05-16 17:41:22 +0000
724+++ compizconfig/gconf/VERSION 1970-01-01 00:00:00 +0000
725@@ -1,1 +0,0 @@
726-0.9.5.2
727
728=== removed file 'compizconfig/gsettings/VERSION'
729--- compizconfig/gsettings/VERSION 2012-05-16 17:43:47 +0000
730+++ compizconfig/gsettings/VERSION 1970-01-01 00:00:00 +0000
731@@ -1,1 +0,0 @@
732-0.9.5.2
733
734=== modified file 'compizconfig/integration/gnome/gsettings/org.compiz.integrated.gschema.xml'
735--- compizconfig/integration/gnome/gsettings/org.compiz.integrated.gschema.xml 2012-08-22 09:15:24 +0000
736+++ compizconfig/integration/gnome/gsettings/org.compiz.integrated.gschema.xml 2012-09-11 08:44:21 +0000
737@@ -2,19 +2,19 @@
738 <schemalist>
739 <schema path="/org/compiz/integrated/" id="org.compiz.integrated">
740 <key type="b" name="display-all-workspaces">
741- <default>false</default>
742+ <default>true</default>
743 </key>
744 <key type="s" name="exec">
745- <default>""</default>
746+ <default>"gnome-terminal"</default>
747 </key>
748 <key type="s" name="command-window-screenshot">
749- <default>""</default>
750+ <default>"gnome-screenshot -w"</default>
751 </key>
752 <key type="s" name="command-screenshot">
753- <default>""</default>
754+ <default>"gnome-screenshot"</default>
755 </key>
756 <key type="s" name="command-terminal">
757- <default>""</default>
758+ <default>"gnome-terminal"</default>
759 </key>
760 <key type="as" name="run-command-12">
761 <default>["Disabled"]</default>
762@@ -89,22 +89,22 @@
763 <default>""</default>
764 </key>
765 <key type="as" name="run-command-terminal">
766- <default>["Disabled"]</default>
767+ <default>["&lt;Control&gt;&lt;Alt&gt;t"]</default>
768 </key>
769 <key type="as" name="run-command-window-screenshot">
770- <default>["Disabled"]</default>
771+ <default>["&lt;Alt&gt;Print"]</default>
772 </key>
773 <key type="as" name="run-command-screenshot">
774- <default>["Disabled"]</default>
775+ <default>["Print"]</default>
776 </key>
777 <key type="as" name="panel-main-menu">
778- <default>["Disabled"]</default>
779+ <default>["&lt;Alt&gt;F1"]</default>
780 </key>
781 <key type="as" name="panel-run-dialog">
782- <default>["Disabled"]</default>
783+ <default>["&lt;Alt&gt;F2"]</default>
784 </key>
785 <key type="as" name="show-hud">
786- <default>["Alt"]</default>
787+ <default>["&lt;Alt&gt;"]</default>
788 </key>
789 </schema>
790 </schemalist>
791
792=== modified file 'compizconfig/integration/gnome/include/ccs_gnome_integration_constants.h'
793--- compizconfig/integration/gnome/include/ccs_gnome_integration_constants.h 2012-08-22 09:15:24 +0000
794+++ compizconfig/integration/gnome/include/ccs_gnome_integration_constants.h 2012-09-11 08:44:21 +0000
795@@ -201,7 +201,7 @@
796 * C doesn't have a concept of "constants" setting
797 * the array size ...
798 */
799-#define CCS_GNOME_INTEGRATED_SETTINGS_LIST_SIZE 119
800+#define CCS_GNOME_INTEGRATED_SETTINGS_LIST_SIZE 120
801
802 typedef struct _CCSGNOMEIntegratedSettingsList
803 {
804
805=== modified file 'compizconfig/libcompizconfig/CMakeLists.txt'
806--- compizconfig/libcompizconfig/CMakeLists.txt 2012-06-29 19:59:35 +0000
807+++ compizconfig/libcompizconfig/CMakeLists.txt 2012-09-11 08:44:21 +0000
808@@ -14,20 +14,13 @@
809
810 set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
811
812-# libcompizconfig package version number
813-# An odd micro number indicates in-progress development.
814-# An even micro number indicates a released version.
815-file (READ ${CMAKE_CURRENT_SOURCE_DIR}/VERSION COMPIZ_RELEASE_VERSION LIMIT 12 OFFSET 0)
816+set (ALL_LINGUAS af ar bg bn bn_IN bs ca cs cy da de el en_GB en_US es eu et fi fr gl gu he hi hr hu id it ja ka km ko lo lt mk mr nb nl or pa pl pt pt_BR ro ru sk sl sr sv ta tr uk vi xh zh_CN zh_TW zu)
817+set (GETTEXT_PACKAGE libcompizconfig)
818+
819+file (READ ${CMAKE_SOURCE_DIR}/VERSION COMPIZ_RELEASE_VERSION LIMIT 12 OFFSET 0)
820 string (STRIP ${COMPIZ_RELEASE_VERSION} COMPIZ_RELEASE_VERSION)
821-
822 set (VERSION ${COMPIZ_RELEASE_VERSION})
823
824-set (_libcompizconfig_package_string "LibCompizConfig ${VERSION}")
825-set (_libcompizconfig_package "LibCompizCompiz")
826-
827-set (ALL_LINGUAS af ar bg bn bn_IN bs ca cs cy da de el en_GB en_US es eu et fi fr gl gu he hi hr hu id it ja ka km ko lo lt mk mr nb nl or pa pl pt pt_BR ro ru sk sl sr sv ta tr uk vi xh zh_CN zh_TW zu)
828-set (GETTEXT_PACKAGE libcompizconfig)
829-
830 configure_file (
831 "${CMAKE_CURRENT_SOURCE_DIR}/config.h.in"
832 "${CMAKE_CURRENT_BINARY_DIR}/config.h"
833
834=== removed file 'compizconfig/libcompizconfig/VERSION'
835--- compizconfig/libcompizconfig/VERSION 2012-05-16 17:42:27 +0000
836+++ compizconfig/libcompizconfig/VERSION 1970-01-01 00:00:00 +0000
837@@ -1,1 +0,0 @@
838-0.9.5.94
839
840=== modified file 'compizconfig/libcompizconfig/cmake/FindCompizConfig.cmake'
841--- compizconfig/libcompizconfig/cmake/FindCompizConfig.cmake 2010-04-23 12:43:51 +0000
842+++ compizconfig/libcompizconfig/cmake/FindCompizConfig.cmake 2012-09-11 08:44:21 +0000
843@@ -2,7 +2,7 @@
844 #
845 # FindCompizConfig
846 #
847-# This module finds LibCompizConfig (www.compiz.org). It uses FindPkgConfig to
848+# This module finds LibCompizConfig (https://launchpad.net/compiz). It uses FindPkgConfig to
849 # locate CompizConfig and adds the CompizConfig CMake module path to the CMake
850 # module path. It also loads the LibCompizConfigDefaults that sets all variables
851 # to compile Compiz modules.
852
853=== modified file 'compizconfig/libcompizconfig/include/CMakeLists.txt'
854--- compizconfig/libcompizconfig/include/CMakeLists.txt 2012-07-08 07:24:06 +0000
855+++ compizconfig/libcompizconfig/include/CMakeLists.txt 2012-09-11 08:44:21 +0000
856@@ -4,6 +4,7 @@
857 ccs-list.h
858 ccs-object.h
859 ccs-string.h
860+ ccs-setting-types.h
861 ccs.h
862 )
863
864
865=== modified file 'compizconfig/libcompizconfig/src/CMakeLists.txt'
866--- compizconfig/libcompizconfig/src/CMakeLists.txt 2012-07-26 23:11:25 +0000
867+++ compizconfig/libcompizconfig/src/CMakeLists.txt 2012-09-11 08:44:21 +0000
868@@ -51,6 +51,11 @@
869 endif (HAVE_INOTIFY)
870
871 add_library (
872+ ccs_settings_upgrade_internal STATIC
873+ ccs_settings_upgrade_internal.c
874+)
875+
876+add_library (
877 compizconfig SHARED
878 ${LIBCOMPIZCONFIG_FILES}
879 )
880@@ -65,7 +70,11 @@
881 )
882
883 target_link_libraries (
884- compizconfig ${LIBCOMPIZCONFIG_LIBRARIES} m
885+ compizconfig
886+ ${LIBCOMPIZCONFIG_LIBRARIES}
887+ m
888+ dl
889+ ccs_settings_upgrade_internal
890 )
891
892 #
893
894=== added file 'compizconfig/libcompizconfig/src/ccs_settings_upgrade_internal.c'
895--- compizconfig/libcompizconfig/src/ccs_settings_upgrade_internal.c 1970-01-01 00:00:00 +0000
896+++ compizconfig/libcompizconfig/src/ccs_settings_upgrade_internal.c 2012-09-11 08:44:21 +0000
897@@ -0,0 +1,168 @@
898+/*
899+ * Compiz configuration system library
900+ *
901+ * Copyright (C) 2012 Canonical Ltd.
902+ *
903+ * This library is free software; you can redistribute it and/or
904+ * modify it under the terms of the GNU Lesser General Public
905+ * License as published by the Free Software Foundation; either
906+ * version 2.1 of the License, or (at your option) any later version.
907+
908+ * This library is distributed in the hope that it will be useful,
909+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
910+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
911+ * Lesser General Public License for more details.
912+
913+ * You should have received a copy of the GNU Lesser General Public
914+ * License along with this library; if not, write to the Free Software
915+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
916+ *
917+ * Authored By:
918+ * Sam Spilsbury <sam.spilsbury@canonical.com>
919+ */
920+
921+#include "ccs_settings_upgrade_internal.h"
922+#include <string.h>
923+#include <errno.h>
924+#include <stdlib.h>
925+#include <stdio.h>
926+
927+typedef Bool (*CCSProcessTokenizedUpgradeFileFunc) (const char *name,
928+ int length,
929+ const char *tokenOne,
930+ const char *tokenTwo,
931+ const char *tokenThree,
932+ int foundNumber,
933+ void *userData);
934+
935+static Bool
936+isUpgrade (const char *name,
937+ int length,
938+ const char *tokenOne,
939+ const char *tokenTwo,
940+ const char *tokenThree,
941+ int foundNumber,
942+ void *userData)
943+{
944+ static const char *UPGRADE = "upgrade";
945+ static const unsigned int UPGRADE_STR_LEN = 7;
946+
947+ if (strncmp (tokenThree, UPGRADE, UPGRADE_STR_LEN))
948+ return FALSE;
949+
950+ return TRUE;
951+}
952+
953+typedef struct _FillDomainNumAndProfileData
954+{
955+ char **domain;
956+ char **profile;
957+ unsigned int *num;
958+} FillDomainNumAndProfileData;
959+
960+static int
961+fillDomainNumAndProfile (const char *name,
962+ int length,
963+ const char *tokenOne,
964+ const char *tokenTwo,
965+ const char *tokenThree,
966+ int foundNumber,
967+ void *userData)
968+{
969+ FillDomainNumAndProfileData *data = (FillDomainNumAndProfileData *) userData;
970+
971+ *data->domain = strndup (name, length - (strlen (tokenOne) + 1));
972+
973+ /* profile.n.upgrade */
974+ *data->profile = strndup (tokenOne, strlen (tokenOne) - (strlen (tokenTwo) + 1));
975+ *data->num = foundNumber;
976+
977+ return 1;
978+}
979+
980+static Bool
981+ccsDetokenizeUpgradeDomainAndExecuteUserFunc (const char *name,
982+ CCSProcessTokenizedUpgradeFileFunc func,
983+ void *userData)
984+{
985+ int length = strlen (name);
986+ const char *tok = name;
987+ Bool success = FALSE;
988+
989+ /* Keep removing domains and other bits
990+ * until we hit a number that we can parse */
991+ while (tok)
992+ {
993+ long int numTmp = 0;
994+ char *nexttok = strchr (tok, '.');
995+ char *nextnexttok = NULL;
996+ char *bit = NULL;
997+
998+ if (!nexttok)
999+ return FALSE;
1000+
1001+ nexttok++;
1002+ nextnexttok = strchr (nexttok, '.');
1003+
1004+ if (!nextnexttok)
1005+ return FALSE;
1006+
1007+ nextnexttok++;
1008+ bit = strndup (nexttok, strlen (nexttok) - (strlen (nextnexttok) + 1));
1009+
1010+ if (sscanf (bit, "%ld", &numTmp) == 1)
1011+ {
1012+ if ((*func) (name,
1013+ length,
1014+ tok,
1015+ nexttok,
1016+ nextnexttok,
1017+ numTmp,
1018+ userData))
1019+ success = TRUE;
1020+ }
1021+ else if (errno)
1022+ perror ("sscanf");
1023+
1024+ tok = nexttok;
1025+ free (bit);
1026+
1027+ if (success)
1028+ return TRUE;
1029+ }
1030+
1031+ return FALSE;
1032+}
1033+
1034+Bool
1035+ccsUpgradeGetDomainNumAndProfile (const char *name,
1036+ char **domain,
1037+ unsigned int *num,
1038+ char **profile)
1039+{
1040+ FillDomainNumAndProfileData data =
1041+ {
1042+ domain,
1043+ profile,
1044+ num
1045+ };
1046+
1047+ return ccsDetokenizeUpgradeDomainAndExecuteUserFunc (name, fillDomainNumAndProfile, (void *) &data);
1048+}
1049+
1050+int
1051+ccsUpgradeNameFilter (const char *name)
1052+{
1053+ Bool result = FALSE;
1054+ int length = strlen (name);
1055+
1056+ if (length < 7)
1057+ return 0;
1058+
1059+ result = ccsDetokenizeUpgradeDomainAndExecuteUserFunc (name, isUpgrade, NULL);
1060+
1061+ if (result)
1062+ return 1;
1063+
1064+ return 0;
1065+}
1066
1067=== added file 'compizconfig/libcompizconfig/src/ccs_settings_upgrade_internal.h'
1068--- compizconfig/libcompizconfig/src/ccs_settings_upgrade_internal.h 1970-01-01 00:00:00 +0000
1069+++ compizconfig/libcompizconfig/src/ccs_settings_upgrade_internal.h 2012-09-11 08:44:21 +0000
1070@@ -0,0 +1,41 @@
1071+/*
1072+ * Compiz configuration system library
1073+ *
1074+ * Copyright (C) 2012 Canonical Ltd.
1075+ *
1076+ * This library is free software; you can redistribute it and/or
1077+ * modify it under the terms of the GNU Lesser General Public
1078+ * License as published by the Free Software Foundation; either
1079+ * version 2.1 of the License, or (at your option) any later version.
1080+
1081+ * This library is distributed in the hope that it will be useful,
1082+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1083+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1084+ * Lesser General Public License for more details.
1085+
1086+ * You should have received a copy of the GNU Lesser General Public
1087+ * License along with this library; if not, write to the Free Software
1088+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1089+ *
1090+ * Authored By:
1091+ * Sam Spilsbury <sam.spilsbury@canonical.com>
1092+ */
1093+#ifndef _COMPIZCONFIG_CCS_SETTINGS_UPGRADE_INTERNAL_H
1094+#define _COMPIZCONFIG_CCS_SETTINGS_UPGRADE_INTERNAL_H
1095+
1096+#include "ccs-defs.h"
1097+
1098+COMPIZCONFIG_BEGIN_DECLS
1099+
1100+Bool
1101+ccsUpgradeGetDomainNumAndProfile (const char *name,
1102+ char **domain,
1103+ unsigned int *num,
1104+ char **profile);
1105+
1106+int
1107+ccsUpgradeNameFilter (const char *name);
1108+
1109+COMPIZCONFIG_END_DECLS
1110+
1111+#endif
1112
1113=== modified file 'compizconfig/libcompizconfig/src/main.c'
1114--- compizconfig/libcompizconfig/src/main.c 2012-08-17 07:33:02 +0000
1115+++ compizconfig/libcompizconfig/src/main.c 2012-09-11 08:44:21 +0000
1116@@ -38,6 +38,7 @@
1117
1118 #include "ccs-private.h"
1119 #include "iniparser.h"
1120+#include "ccs_settings_upgrade_internal.h"
1121
1122 static void * wrapRealloc (void *o, void *a , size_t b)
1123 {
1124@@ -1880,9 +1881,12 @@
1125 }
1126 case TypeList:
1127 {
1128- to->forList.listInfo = calloc (1, sizeof (CCSSettingInfo));
1129-
1130- copyInfo (from->forList.listInfo, to->forList.listInfo, from->forList.listType);
1131+ if (from->forList.listInfo)
1132+ {
1133+ to->forList.listInfo = calloc (1, sizeof (CCSSettingInfo));
1134+
1135+ copyInfo (from->forList.listInfo, to->forList.listInfo, from->forList.listType);
1136+ }
1137
1138 break;
1139 }
1140@@ -1936,18 +1940,26 @@
1141 static void
1142 copySetting (CCSSetting *from, CCSSetting *to)
1143 {
1144- memcpy (to, from, sizeof (CCSSetting));
1145-
1146- ccsObjectInit (from, &ccsDefaultObjectAllocator);
1147-
1148 /* Allocate a new private ptr for the new setting */
1149 CCSSettingPrivate *ccsPrivate = calloc (1, sizeof (CCSSettingPrivate));
1150
1151 ccsObjectSetPrivate (to, (CCSPrivate *) ccsPrivate);
1152
1153+ unsigned int i = 0;
1154+
1155+ /* copy interfaces */
1156+ for (; i < from->object.n_interfaces; ++i)
1157+ ccsObjectAddInterface (to,
1158+ from->object.interfaces[i],
1159+ from->object.interface_types[i]);
1160+
1161 CCSSettingPrivate *fromPrivate = (CCSSettingPrivate *) ccsObjectGetPrivate (from);
1162 CCSSettingPrivate *toPrivate = (CCSSettingPrivate *) ccsObjectGetPrivate (to);
1163
1164+ /* copy from fromPrivate to toPrivate for now, and replace all
1165+ * fields that should be replaced */
1166+ memcpy (toPrivate, fromPrivate, sizeof (CCSSettingPrivate));
1167+
1168 if (fromPrivate->name)
1169 toPrivate->name = strdup (fromPrivate->name);
1170 if (fromPrivate->shortDesc)
1171@@ -1979,7 +1991,7 @@
1172 toPrivate->defaultValue.parent = to;
1173 toPrivate->privatePtr = NULL;
1174
1175- (to)->object.refcnt = 1;
1176+ ccsSettingRef (to);
1177 }
1178
1179 static void
1180@@ -4595,9 +4607,11 @@
1181 {
1182 CCSSetting *tempSetting = (CCSSetting *) sl->data;
1183 CCSSetting *setting;
1184-
1185- setting = ccsFindSetting (ccsSettingGetParent (tempSetting), ccsSettingGetName (tempSetting));
1186-
1187+ CCSPlugin *plugin = ccsSettingGetParent (tempSetting);
1188+ const char *name = ccsSettingGetName (tempSetting);
1189+
1190+ setting = ccsFindSetting (plugin, name);
1191+
1192 if (setting)
1193 {
1194 if (ccsSettingGetType (setting) != TypeList)
1195@@ -4658,8 +4672,10 @@
1196 {
1197 CCSSetting *tempSetting = (CCSSetting *) sl->data;
1198 CCSSetting *setting;
1199+ CCSPlugin *plugin = ccsSettingGetParent (tempSetting);
1200+ const char *name = ccsSettingGetName (tempSetting);
1201
1202- setting = ccsFindSetting (ccsSettingGetParent (tempSetting), ccsSettingGetName (tempSetting));
1203+ setting = ccsFindSetting (plugin, name);
1204
1205 if (setting)
1206 {
1207@@ -4715,8 +4731,10 @@
1208 {
1209 CCSSetting *tempSetting = (CCSSetting *) sl->data;
1210 CCSSetting *setting;
1211-
1212- setting = ccsFindSetting (ccsSettingGetParent (tempSetting), ccsSettingGetName (tempSetting));
1213+ CCSPlugin *plugin = ccsSettingGetParent (tempSetting);
1214+ const char *name = ccsSettingGetName (tempSetting);
1215+
1216+ setting = ccsFindSetting (plugin, name);
1217
1218 if (setting)
1219 {
1220@@ -4760,161 +4778,84 @@
1221 static int
1222 upgradeNameFilter (const struct dirent *name)
1223 {
1224- int length = strlen (name->d_name);
1225- char *uname, *tok;
1226-
1227- if (length < 7)
1228- return 0;
1229-
1230- uname = tok = strdup (name->d_name);
1231-
1232- /* Keep removing domains and other bits
1233- * until we hit a number that we can parse */
1234- while (tok)
1235- {
1236- long int num = 0;
1237- char *nexttok = strchr (tok, '.') + 1;
1238- char *nextnexttok = strchr (nexttok, '.') + 1;
1239- char *end;
1240- char *bit = strndup (nexttok, strlen (nexttok) - (strlen (nextnexttok) + 1));
1241-
1242- /* FIXME: That means that the number can't be a zero */
1243- errno = 0;
1244- num = strtol (bit, &end, 10);
1245-
1246- if (!(errno != 0 && num == 0) &&
1247- end != bit)
1248- {
1249- free (bit);
1250-
1251- /* Check if the next token after the number
1252- * is .upgrade */
1253-
1254- if (strncmp (nextnexttok, "upgrade", 7))
1255- return 0;
1256- break;
1257- }
1258- else if (errno)
1259- perror ("strtol");
1260-
1261- tok = nexttok;
1262-
1263- free (bit);
1264- }
1265-
1266- free (uname);
1267-
1268- return 1;
1269-}
1270+ return ccsUpgradeNameFilter (name->d_name);
1271+}
1272+
1273+void
1274+ccsFreeUpgrade (CCSSettingsUpgrade *upgrade)
1275+{
1276+ if (upgrade->profile)
1277+ free (upgrade->profile);
1278+
1279+ if (upgrade->domain)
1280+ free (upgrade->domain);
1281+
1282+ if (upgrade->file)
1283+ free (upgrade->file);
1284+
1285+ free (upgrade);
1286+}
1287
1288 /*
1289 * Process a filename into the properties
1290 * for a settings upgrade
1291 * eg
1292- *
1293+ *
1294 * org.freedesktop.compiz.Default.01.upgrade
1295- *
1296+ *
1297 * gives us:
1298 * domain: org.freedesktop.compiz
1299 * number: 1
1300 * profile: Default
1301- *
1302+ *
1303 */
1304 CCSSettingsUpgrade *
1305-ccsSettingsUpgradeNew (char *path, char *name)
1306+ccsSettingsUpgradeNew (char *path, const char *name)
1307 {
1308 CCSSettingsUpgrade *upgrade = calloc (1, sizeof (CCSSettingsUpgrade));
1309- int length = strlen (name);
1310- char *uname, *tok;
1311+ char *upgradeName = strdup (name);
1312 unsigned int fnlen = strlen (path) + strlen (name) + 1;
1313
1314 upgrade->file = calloc (fnlen + 1, sizeof (char));
1315 sprintf (upgrade->file, "%s/%s", path, name);
1316
1317- uname = tok = strdup (name);
1318+ upgradeName = strdup (name);
1319
1320- /* Keep removing domains and other bits
1321- * until we hit a number that we can parse */
1322- while (tok)
1323+ if (!ccsUpgradeGetDomainNumAndProfile (upgradeName,
1324+ &upgrade->domain,
1325+ &upgrade->num,
1326+ &upgrade->profile))
1327 {
1328- long int num = 0;
1329- char *nexttok = strchr (tok, '.') + 1;
1330- char *nextnexttok = strchr (nexttok, '.') + 1;
1331- char *end;
1332- char *bit = strndup (nexttok, strlen (nexttok) - (strlen (nextnexttok) + 1));
1333-
1334- /* FIXME: That means that the number can't be a zero */
1335- errno = 0;
1336- num = strtol (bit, &end, 10);
1337-
1338- if (!(errno != 0 && num == 0) &&
1339- end != bit)
1340- {
1341- upgrade->domain = strndup (uname, length - (strlen (tok) + 1));
1342- upgrade->num = num;
1343-
1344- /* profile.n.upgrade */
1345- upgrade->profile = strndup (tok, strlen (tok) - (strlen (nexttok) + 1));
1346- free (bit);
1347- break;
1348- }
1349- else if (errno)
1350- perror ("strtol");
1351-
1352- tok = nexttok;
1353-
1354- free (bit);
1355+ ccsFreeUpgrade (upgrade);
1356+ upgrade = NULL;
1357 }
1358-
1359- free (uname);
1360-
1361+
1362+ free (upgradeName);
1363+
1364 return upgrade;
1365 }
1366
1367-Bool
1368-ccsCheckForSettingsUpgradeDefault (CCSContext *context)
1369+static FILE *
1370+ccsGetDoneSettingsUpgradeFile (const char *home)
1371 {
1372- struct dirent **nameList;
1373- int nFile, i;
1374- char *path = DATADIR "/compizconfig/upgrades/";
1375 char *dupath = NULL;
1376- FILE *completedUpgrades;
1377+ FILE *completedUpgrades = NULL;
1378+
1379+ if (asprintf (&dupath, "%s/.config/compiz-1/compizconfig/done_upgrades", home) == -1)
1380+ return NULL;
1381+
1382+ completedUpgrades = fopen (dupath, "a+");
1383+ free (dupath);
1384+
1385+ return completedUpgrades;
1386+}
1387+
1388+static char *
1389+ccsReadCompletedUpgradesIntoString (FILE *completedUpgrades)
1390+{
1391 char *cuBuffer;
1392 unsigned int cuSize;
1393 size_t cuReadSize;
1394- char *home = getenv ("HOME");
1395-
1396- if (!home)
1397- return FALSE;
1398-
1399- if (asprintf (&dupath, "%s/.config/compiz-1/compizconfig/done_upgrades", home) == -1)
1400- return FALSE;
1401-
1402- completedUpgrades = fopen (dupath, "a+");
1403-
1404- if (!path)
1405- {
1406- free (dupath);
1407- fclose (completedUpgrades);
1408- return FALSE;
1409- }
1410-
1411- nFile = scandir (path, &nameList, upgradeNameFilter, alphasort);
1412- if (nFile <= 0)
1413- {
1414- free (dupath);
1415- fclose (completedUpgrades);
1416- return FALSE;
1417- }
1418-
1419- if (!completedUpgrades)
1420- {
1421- free (nameList);
1422- free (dupath);
1423- fclose (completedUpgrades);
1424- ccsWarning ("Error opening done_upgrades");
1425- return FALSE;
1426- }
1427
1428 fseek (completedUpgrades, 0, SEEK_END);
1429 cuSize = ftell (completedUpgrades);
1430@@ -4928,38 +4869,118 @@
1431
1432 cuBuffer[cuSize] = '\0';
1433
1434+ return cuBuffer;
1435+}
1436+
1437+static unsigned int
1438+ccsGetUpgradeFilesForProcessing (const char *upgradePath,
1439+ struct dirent ***passedNameList)
1440+{
1441+ struct dirent **nameList = NULL;
1442+ unsigned int nFile = scandir (upgradePath, &nameList, upgradeNameFilter, alphasort);
1443+
1444+ if (nFile <= 0)
1445+ return 0;
1446+
1447+ *passedNameList = nameList;
1448+
1449+ return nFile;
1450+}
1451+
1452+static Bool
1453+ccsShouldSkipUpgrade (const char *upgrade,
1454+ const char *skipBuffer)
1455+{
1456+ char *matched = strstr (skipBuffer, upgrade);
1457+
1458+ if (matched != NULL)
1459+ {
1460+ ccsDebug ("Skipping upgrade %s", upgrade);
1461+ return TRUE;
1462+ }
1463+
1464+ return FALSE;
1465+}
1466+
1467+static void
1468+ccsProcessUpgradeOnce (CCSContext *context,
1469+ CCSSettingsUpgrade *upgrade,
1470+ const char *upgradeName,
1471+ FILE *completedUpgrades)
1472+{
1473+ ccsDebug ("Processing upgrade %s\n profile: %s\n number: %i\n domain: %s",
1474+ upgradeName,
1475+ upgrade->profile,
1476+ upgrade->num,
1477+ upgrade->domain);
1478+
1479+ ccsProcessUpgrade (context, upgrade);
1480+ ccsWriteChangedSettings (context);
1481+ ccsWriteAutoSortedPluginList (context);
1482+ ccsDebug ("Completed upgrade %s", upgradeName);
1483+
1484+ fprintf (completedUpgrades, "%s\n", upgradeName);
1485+ ccsFreeUpgrade (upgrade);
1486+}
1487+
1488+Bool
1489+ccsCheckForSettingsUpgradeDefault (CCSContext *context)
1490+{
1491+ struct dirent **nameList = NULL;
1492+ int nFile, i;
1493+ char *path = DATADIR "/compizconfig/upgrades/";
1494+ FILE *completedUpgrades;
1495+ char *cuBuffer = NULL;
1496+ char *home = getenv ("HOME");
1497+
1498+ if (!home)
1499+ return FALSE;
1500+
1501+ completedUpgrades = ccsGetDoneSettingsUpgradeFile (home);
1502+
1503+ if (!completedUpgrades)
1504+ return FALSE;
1505+
1506+ cuBuffer = ccsReadCompletedUpgradesIntoString (completedUpgrades);
1507+
1508+ if (!cuBuffer)
1509+ {
1510+ fclose (completedUpgrades);
1511+ ccsWarning ("Error opening done_upgrades");
1512+ return FALSE;
1513+ }
1514+
1515+ nFile = ccsGetUpgradeFilesForProcessing (path, &nameList);
1516+
1517+ if (!nFile || !nameList)
1518+ {
1519+ free (cuBuffer);
1520+ fclose (completedUpgrades);
1521+ return FALSE;
1522+ }
1523+
1524 for (i = 0; i < nFile; i++)
1525 {
1526- char *matched = strstr (cuBuffer, nameList[i]->d_name);
1527- CCSSettingsUpgrade *upgrade;
1528-
1529- if (matched)
1530- {
1531- ccsDebug ("Skipping upgrade %s", nameList[i]->d_name);
1532+ CCSSettingsUpgrade *upgrade = NULL;
1533+ const char *upgradeName = nameList[i]->d_name;
1534+
1535+ if (ccsShouldSkipUpgrade (upgradeName,
1536+ cuBuffer))
1537 continue;
1538- }
1539-
1540- upgrade = ccsSettingsUpgradeNew (path, nameList[i]->d_name);
1541-
1542- ccsDebug ("Processing upgrade %s\nprofile: %s\nnumber: %i\ndomain: %s", nameList[i]->d_name, upgrade->profile, upgrade->num, upgrade->domain);
1543-
1544- ccsProcessUpgrade (context, upgrade);
1545- ccsWriteChangedSettings (context);
1546- ccsWriteAutoSortedPluginList (context);
1547- ccsDebug ("Completed upgrade %s", nameList[i]->d_name);
1548- fprintf (completedUpgrades, "%s\n", nameList[i]->d_name);
1549- free (upgrade->profile);
1550- free (upgrade->domain);
1551- free (upgrade->file);
1552- free (upgrade);
1553+
1554+ upgrade = ccsSettingsUpgradeNew (path, upgradeName);
1555+
1556+ ccsProcessUpgradeOnce (context, upgrade, upgradeName, completedUpgrades);
1557+
1558 free (nameList[i]);
1559 }
1560
1561- free (dupath);
1562 fclose (completedUpgrades);
1563 free (cuBuffer);
1564- free (nameList);
1565-
1566+
1567+ if (nameList != NULL)
1568+ free (nameList);
1569+
1570 return TRUE;
1571 }
1572
1573
1574=== modified file 'compizconfig/libcompizconfig/tests/CMakeLists.txt'
1575--- compizconfig/libcompizconfig/tests/CMakeLists.txt 2012-08-16 10:16:42 +0000
1576+++ compizconfig/libcompizconfig/tests/CMakeLists.txt 2012-09-11 08:44:21 +0000
1577@@ -2,6 +2,7 @@
1578 include_directories (${CMAKE_SOURCE_DIR}/include)
1579 include_directories (${CMAKE_SOURCE_DIR}/tests/shared)
1580 include_directories (${CMAKE_CURRENT_SOURCE_DIR}/../../mocks/libcompizconfig)
1581+include_directories (${CMAKE_CURRENT_SOURCE_DIR}/../src)
1582 include_directories (${CMAKE_SOURCE_DIR}/compizconfig/tests)
1583 link_directories (${CMAKE_INSTALL_PREFIX}/lib)
1584 link_directories (${CMAKE_CURRENT_BINARY_DIR}/../../mocks/libcompizconfig)
1585@@ -27,6 +28,9 @@
1586 add_executable (compizconfig_test_ccs_mock_backend_conformance
1587 ${CMAKE_CURRENT_SOURCE_DIR}/compizconfig_test_ccs_mock_backend_conformance.cpp)
1588
1589+add_executable (compizconfig_test_ccs_upgrade_internal
1590+ ${CMAKE_CURRENT_SOURCE_DIR}/compizconfig_test_ccs_settings_upgrade_internal.cpp)
1591+
1592 if (HAVE_PROTOBUF)
1593 set (LIBCOMPIZCONFIG_LIBRARIES
1594 ${LIBCOMPIZCONFIG_LIBRARIES}
1595@@ -98,8 +102,17 @@
1596 compizconfig_ccs_plugin_mock
1597 compizconfig_ccs_setting_mock)
1598
1599+target_link_libraries (compizconfig_test_ccs_upgrade_internal
1600+ ${GTEST_BOTH_LIBRARIES}
1601+ ${GMOCK_LIBRARY}
1602+ ${GMOCK_MAIN_LIBRARY}
1603+ ${CMAKE_THREAD_LIBS_INIT}
1604+ ccs_settings_upgrade_internal
1605+)
1606+
1607 compiz_discover_tests (compizconfig_test_ccs_object COVERAGE compizconfig)
1608 compiz_discover_tests (compizconfig_test_ccs_context COVERAGE compizconfig_ccs_context_mock)
1609 compiz_discover_tests (compizconfig_test_ccs_plugin COVERAGE compizconfig_ccs_plugin_mock)
1610 compiz_discover_tests (compizconfig_test_ccs_setting COVERAGE compizconfig_ccs_setting_mock)
1611 compiz_discover_tests (compizconfig_test_ccs_mock_backend_conformance COVERAGE compizconfig_ccs_backend_mock)
1612+compiz_discover_tests (compizconfig_test_ccs_upgrade_internal COVERAGE ccs_settings_upgrade_internal)
1613
1614=== added file 'compizconfig/libcompizconfig/tests/compizconfig_test_ccs_settings_upgrade_internal.cpp'
1615--- compizconfig/libcompizconfig/tests/compizconfig_test_ccs_settings_upgrade_internal.cpp 1970-01-01 00:00:00 +0000
1616+++ compizconfig/libcompizconfig/tests/compizconfig_test_ccs_settings_upgrade_internal.cpp 2012-09-11 08:44:21 +0000
1617@@ -0,0 +1,70 @@
1618+#include <gtest/gtest.h>
1619+#include <gmock/gmock.h>
1620+
1621+#include "ccs_settings_upgrade_internal.h"
1622+#include "gtest_shared_characterwrapper.h"
1623+
1624+using ::testing::IsNull;
1625+
1626+class CCSSettingsUpgradeInternalTest :
1627+ public ::testing::Test
1628+{
1629+};
1630+
1631+namespace
1632+{
1633+ static const std::string CCS_SETTINGS_UPGRADE_TEST_CORRECT_FILENAME = "org.compiz.general.1.upgrade";
1634+ static const std::string CCS_SETTINGS_UPGRADE_TEST_INCORRECT_FILENAME = "1.upgra";
1635+ static const std::string CCS_SETTINGS_UPGRADE_TEST_CORRECT_DOMAIN = "org.compiz";
1636+ static const std::string CCS_SETTINGS_UPGRADE_TEST_CORRECT_PROFILE = "general";
1637+ static const unsigned int CCS_SETTINGS_UPGRADE_TEST_CORRECT_NUM = 1;
1638+}
1639+
1640+MATCHER(BoolTrue, "Bool True") { if (arg) return true; else return false; }
1641+MATCHER(BoolFalse, "Bool False") { if (!arg) return true; else return false; }
1642+
1643+TEST_F (CCSSettingsUpgradeInternalTest, TestDetokenizeAndSetValues)
1644+{
1645+ char *profileName = NULL;
1646+ char *domainName = NULL;
1647+
1648+ unsigned int num;
1649+
1650+ EXPECT_THAT (ccsUpgradeGetDomainNumAndProfile (CCS_SETTINGS_UPGRADE_TEST_CORRECT_FILENAME.c_str (),
1651+ &domainName,
1652+ &num,
1653+ &profileName), BoolTrue ());
1654+
1655+ CharacterWrapper profileNameC (profileName);
1656+ CharacterWrapper domainNameC (domainName);
1657+
1658+ EXPECT_EQ (CCS_SETTINGS_UPGRADE_TEST_CORRECT_PROFILE, profileName);
1659+ EXPECT_EQ (CCS_SETTINGS_UPGRADE_TEST_CORRECT_DOMAIN, domainName);
1660+ EXPECT_EQ (num, CCS_SETTINGS_UPGRADE_TEST_CORRECT_NUM);
1661+}
1662+
1663+TEST_F (CCSSettingsUpgradeInternalTest, TestDetokenizeAndSetValuesReturnsFalseIfInvalid)
1664+{
1665+ char *profileName = NULL;
1666+ char *domainName = NULL;
1667+
1668+ unsigned int num;
1669+
1670+ EXPECT_THAT (ccsUpgradeGetDomainNumAndProfile (CCS_SETTINGS_UPGRADE_TEST_INCORRECT_FILENAME.c_str (),
1671+ &domainName,
1672+ &num,
1673+ &profileName), BoolFalse ());
1674+
1675+ EXPECT_THAT (profileName, IsNull ());
1676+ EXPECT_THAT (domainName, IsNull ());
1677+}
1678+
1679+TEST_F (CCSSettingsUpgradeInternalTest, TestDetokenizeAndReturnTrueForUpgradeFileName)
1680+{
1681+ EXPECT_THAT (ccsUpgradeNameFilter (CCS_SETTINGS_UPGRADE_TEST_CORRECT_FILENAME.c_str ()), BoolTrue ());
1682+}
1683+
1684+TEST_F (CCSSettingsUpgradeInternalTest, TestDetokenizeAndReturnFalseForNoUpgradeFileName)
1685+{
1686+ EXPECT_THAT (ccsUpgradeNameFilter (CCS_SETTINGS_UPGRADE_TEST_CORRECT_FILENAME.c_str ()), BoolTrue ());
1687+}
1688
1689=== modified file 'debian/changelog'
1690--- debian/changelog 2012-09-07 11:25:34 +0000
1691+++ debian/changelog 2012-09-11 08:44:21 +0000
1692@@ -1,9 +1,68 @@
1693-compiz (1:0.9.8.0-0ubuntu2) UNRELEASED; urgency=low
1694+compiz (1:0.9.8.2-0ubuntu1) UNRELEASED; urgency=low
1695
1696+ [ Sam Spilsbury ]
1697 * debian/python-compizconfig.install
1698 - Install compizconfig-python.pc
1699-
1700- -- Sam Spilsbury <sam.spilsbury@canonical.com> Fri, 07 Sep 2012 17:08:53 +0800
1701+ * debian/patches/100_expo_layout.patch
1702+ - re-add the expo layout that used to be in precise (LP: #1047067)
1703+ - add some testcases
1704+
1705+ [ Timo Jyrinki ]
1706+ * New upstream release.
1707+ - Fix multiple window placement bugs (LP: #974242) (LP: #976032)
1708+ - Don't waste CPU looping through and looking at all the windows if you're
1709+ rendering an output that has no damage on it. (LP: #1014986)
1710+ - Updated convert files to fix some typos in the key names. (LP: #1041631)
1711+ - Fix crash when imgsvg is loaded, due to missing symbol
1712+ (decor_apply_gravity from libdecoration). (LP: #956986)
1713+ - Treat unresolved symbols at link time as an error, rather than letting
1714+ them through and cause strange crashes later. (LP: #1043143)
1715+ - Refactors a little bit of the upgrade code and gets it under test to
1716+ prepare to fix (LP: #1042537)
1717+ - Updated AUTHORS from the full bzr log, and re-sort the list.
1718+ (LP: #1042095)
1719+ - Fixes FTBFS for kde4-window-decorator (LP: #1041310)
1720+ - Fix obvious omissions from the introduction of unminimize_*,
1721+ which were causing the unminimize animation settings to be ignored
1722+ (LP: #1040455)
1723+ - resize plugin: don't crash if resize wasn't initiated externally
1724+ (LP: #1045191)
1725+ - Clean up capitalization (LP: #1045652)
1726+ - Avoid division by zero, if plugins try to deform a window down to size
1727+ zero. (LP: #1045235)
1728+ - Make "Unredirect Fullscreen Windows" more reliable. This fixes the
1729+ problem with unredirection failing to engage at all (LP: #1041066) when
1730+ gtk-window-decorator creates offscreen windows that are stacked on top.
1731+ This also fixes the problem with unredirect hiding all windows,
1732+ because it thinks the desktop window should be stacked on top
1733+ (LP: #980663).
1734+ - Ensure unredirected windows don't stay unredirected if they're no longer
1735+ on top. (LP: #1041047)
1736+ - Fix launching terminal functionality and make show-hud default key
1737+ visible. Update the defaults to org.compiz.integrated to reflect the
1738+ actual gnome values pre-gnome-3. (LP: #1040081) (LP: #1046199)
1739+ (LP: #1046190)
1740+ - Fix show-hud, bump COMPIZ_GNOME_INTEGRATED_SETTINGS_LIST_SIZE.
1741+ (LP: #1046212)
1742+ - Fixed: Windows with an alpha-channel, like gnome-terminal, were not
1743+ being considered as possibly covering fullscreen windows. But they most
1744+ certainly can. This ensures such RGBA windows are visible if they're
1745+ stacked above a fullscreen window. (LP: #1046661)
1746+ - Remove ListToStringList (LP: #1046184)
1747+ - Fix typo causing CMake Error (LP: #1045665)
1748+ - Transitions gtk-window-decorator over to use GSettings. Add a testing
1749+ framework for the options code. (LP: #1042323)
1750+ - Also need kdeworkspace since kdecorationbridge.h is there
1751+ (LP: #1046770)
1752+ - Implements some cleanup that was suggested on the merge for the original
1753+ port to gsettings (LP: #1042323)
1754+ * debian/compiz-dev.install
1755+ - Remove compizconfig-python.pc, now in python-compizconfig.install
1756+ * Cherry-pick fix from upstream:
1757+ - Migrate profile independent keys separately from the profile
1758+ dependent keys (LP: #1046190)
1759+
1760+ -- Timo Jyrinki <timo-jyrinki@ubuntu.com> Mon, 10 Sep 2012 15:27:32 +0300
1761
1762 compiz (1:0.9.8.0-0ubuntu1) quantal-proposed; urgency=low
1763
1764
1765=== modified file 'debian/compiz-dev.install'
1766--- debian/compiz-dev.install 2012-08-24 13:41:00 +0000
1767+++ debian/compiz-dev.install 2012-09-11 08:44:21 +0000
1768@@ -1,6 +1,14 @@
1769 debian/tmp/usr/include/compiz/[!d]*
1770 debian/tmp/usr/lib/libcompiz_core.so
1771-debian/tmp/usr/lib/pkgconfig/[!l]*
1772+debian/tmp/usr/lib/pkgconfig/compiz-animation.pc
1773+debian/tmp/usr/lib/pkgconfig/compiz-compiztoolbox.pc
1774+debian/tmp/usr/lib/pkgconfig/compiz-composite.pc
1775+debian/tmp/usr/lib/pkgconfig/compiz-cube.pc
1776+debian/tmp/usr/lib/pkgconfig/compiz-mousepoll.pc
1777+debian/tmp/usr/lib/pkgconfig/compiz-opengl.pc
1778+debian/tmp/usr/lib/pkgconfig/compiz.pc
1779+debian/tmp/usr/lib/pkgconfig/compiz-scale.pc
1780+debian/tmp/usr/lib/pkgconfig/compiz-text.pc
1781 debian/tmp/usr/share/compiz/xslt
1782 debian/tmp/usr/share/cmake*/FindCompiz.cmake
1783 debian/tmp/usr/share/cmake*/Modules/FindCompiz.cmake
1784
1785=== modified file 'debian/compiz-gnome.migrations'
1786--- debian/compiz-gnome.migrations 2012-08-17 08:50:20 +0000
1787+++ debian/compiz-gnome.migrations 2012-09-11 08:44:21 +0000
1788@@ -1,1 +1,2 @@
1789 postinst/migration-scripts/02_migrate_to_gsettings.py
1790+postinst/migration-scripts/03_migrate_profile_independent.py
1791
1792=== added file 'debian/patches/100_expo_layout.patch'
1793--- debian/patches/100_expo_layout.patch 1970-01-01 00:00:00 +0000
1794+++ debian/patches/100_expo_layout.patch 2012-09-11 08:44:21 +0000
1795@@ -0,0 +1,2903 @@
1796+Index: ubuntu/plugins/expo/expo.xml.in
1797+===================================================================
1798+--- ubuntu.orig/plugins/expo/expo.xml.in 2012-09-08 11:51:32.971327571 +0800
1799++++ ubuntu/plugins/expo/expo.xml.in 2012-09-08 11:51:33.103328227 +0800
1800+@@ -17,6 +17,7 @@
1801+ <plugin>wobbly</plugin>
1802+ <plugin>animation</plugin>
1803+ <plugin>wallpaper</plugin>
1804++ <plugin>imgpng</plugin>
1805+ </relation>
1806+ </deps>
1807+ <options>
1808+@@ -25,7 +26,7 @@
1809+ <option name="expo_key" type="key">
1810+ <_short>Expo key</_short>
1811+ <_long>Engage wall expo mode key binding</_long>
1812+- <default>&lt;Super&gt;e</default>
1813++ <default>&lt;Super&gt;s</default>
1814+ </option>
1815+ <option name="expo_button" type="button">
1816+ <_short>Expo button</_short>
1817+@@ -35,8 +36,6 @@
1818+ <option name="expo_edge" type="edge">
1819+ <_short>Expo edge</_short>
1820+ <_long>Engage wall expo mode edge binding</_long>
1821+- <default>
1822+- </default>
1823+ </option>
1824+ <option name="double_click_time" type="int">
1825+ <_short>Double click time</_short>
1826+@@ -79,7 +78,7 @@
1827+ <option name="zoom_time" type="float">
1828+ <_short>Zoom time</_short>
1829+ <_long>Duration of the zoomout animation</_long>
1830+- <default>0.5</default>
1831++ <default>0.3</default>
1832+ <min>0.1</min>
1833+ <max>5.0</max>
1834+ <precision>0.1</precision>
1835+@@ -130,10 +129,24 @@
1836+ <_name>Curve</_name>
1837+ </desc>
1838+ </option>
1839++ <option name="x_offset" type="int">
1840++ <_short>X Space</_short>
1841++ <_long> Left Side screen space of expo in pixels</_long>
1842++ <min>-1680</min>
1843++ <max>1680</max>
1844++ <default>64</default>
1845++ </option>
1846++ <option name="y_offset" type="int">
1847++ <_short>Y Space</_short>
1848++ <_long> Top Side screen space of expo in pixels</_long>
1849++ <min>-100</min>
1850++ <max>100</max>
1851++ <default>24</default>
1852++ </option>
1853+ <option name="distance" type="float">
1854+ <_short>Distance</_short>
1855+ <_long>Distance of the expo wall</_long>
1856+- <default>0.0</default>
1857++ <default>0.005</default>
1858+ <min>0.0</min>
1859+ <max>1.0</max>
1860+ <precision>0.01</precision>
1861+@@ -141,7 +154,7 @@
1862+ <option name="vp_distance" type="float">
1863+ <_short>Viewport distance</_short>
1864+ <_long>Distance between viewports</_long>
1865+- <default>0.10</default>
1866++ <default>0.2</default>
1867+ <min>0.0</min>
1868+ <max>1.0</max>
1869+ <precision>0.01</precision>
1870+@@ -192,7 +205,7 @@
1871+ <option name="vp_brightness" type="float">
1872+ <_short>Brightness</_short>
1873+ <_long>Inactive viewport brightness.</_long>
1874+- <default>75.0</default>
1875++ <default>40.0</default>
1876+ <min>0.0</min>
1877+ <max>100.0</max>
1878+ <precision>0.1</precision>
1879+@@ -200,18 +213,28 @@
1880+ <option name="vp_saturation" type="float">
1881+ <_short>Saturation</_short>
1882+ <_long>Inactive viewport saturation.</_long>
1883+- <default>100.0</default>
1884++ <default>40.0</default>
1885+ <min>0.0</min>
1886+ <max>100.0</max>
1887+ <precision>0.1</precision>
1888+ </option>
1889++ <option name="selected_color" type="color">
1890++ <_short>Selected Color</_short>
1891++ <_long>Color to use when highlighting the selected viewport</_long>
1892++ <default>
1893++ <red>0xfbfb</red>
1894++ <green>0x8b8b</green>
1895++ <blue>0x0</blue>
1896++ <alpha>0xffff</alpha>
1897++ </default>
1898++ </option>
1899+ </subgroup>
1900+ <subgroup>
1901+ <short>Reflection</short>
1902+ <option name="reflection" type="bool">
1903+ <_short>Reflection</_short>
1904+ <_long>Show a reflection of the viewports on the ground</_long>
1905+- <default>true</default>
1906++ <default>false</default>
1907+ </option>
1908+ <option name="ground_color1" type="color">
1909+ <_short>Ground color(near)</_short>
1910+@@ -244,7 +267,7 @@
1911+ <option name="scale_factor" type="float">
1912+ <_short>Reflection Scale</_short>
1913+ <_long>Scale factor of the expo wall reflection</_long>
1914+- <default>0.75</default>
1915++ <default>1.0</default>
1916+ <min>0.0</min>
1917+ <max>2.0</max>
1918+ <precision>0.01</precision>
1919+Index: ubuntu/plugins/expo/src/expo.cpp
1920+===================================================================
1921+--- ubuntu.orig/plugins/expo/src/expo.cpp 2012-09-08 11:51:02.279175377 +0800
1922++++ ubuntu/plugins/expo/src/expo.cpp 2012-09-08 15:18:15.744829608 +0800
1923+@@ -27,6 +27,8 @@
1924+
1925+ #include "expo.h"
1926+ #include "click-threshold.h"
1927++#include "wall-offset.h"
1928++#include "windows-on-viewport.h"
1929+ #include <math.h>
1930+ #ifndef USE_GLES
1931+ #include <GL/glu.h>
1932+@@ -73,11 +75,10 @@
1933+
1934+ if (dndState == DnDDuring || dndState == DnDStart)
1935+ {
1936+- if (dndWindow)
1937++ if (dndWindows.size ())
1938+ finishWindowMovement ();
1939+
1940+ dndState = DnDNone;
1941+- dndWindow = NULL;
1942+
1943+ action->setState (action->state () & CompAction::StateInitButton);
1944+ cScreen->damageScreen ();
1945+@@ -113,7 +114,6 @@
1946+ clickTime = 0;
1947+
1948+ dndState = DnDNone;
1949+- dndWindow = NULL;
1950+
1951+ selectedVp = screen->vp ();
1952+ lastSelectedVp = screen->vp ();
1953+@@ -156,8 +156,8 @@
1954+ else
1955+ vpUpdateMode = VPUpdateMouseOver;
1956+
1957+- dndState = DnDNone;
1958+- dndWindow = NULL;
1959++ dndState = DnDNone;
1960++ dndWindows.clear ();
1961+
1962+ screen->removeAction (&optionGetDndButton ());
1963+ screen->removeAction (&optionGetExitButton ());
1964+@@ -202,6 +202,8 @@
1965+ if (!expoMode)
1966+ return false;
1967+
1968++ lastSelectedVp = selectedVp;
1969++
1970+ newX = selectedVp.x () + 1;
1971+ newY = selectedVp.y ();
1972+
1973+@@ -225,7 +227,7 @@
1974+ CompAction::State state,
1975+ CompOption::Vector& options)
1976+ {
1977+- int newX, newY;
1978++ unsigned int newX, newY;
1979+ Window xid = CompOption::getIntOptionNamed (options, "root", 0);
1980+ if (xid != screen->root ())
1981+ return false;
1982+@@ -272,53 +274,39 @@
1983+ void
1984+ ExpoScreen::finishWindowMovement ()
1985+ {
1986+- dndWindow->syncPosition ();
1987+- dndWindow->ungrabNotify ();
1988+-
1989+- screen->moveViewport (screen->vp ().x () - selectedVp.x (),
1990+- screen->vp ().y () - selectedVp.y (), true);
1991+-
1992+- /* update saved window attributes in case we moved the
1993+- window to a new viewport */
1994+- if (dndWindow->saveMask () & CWX)
1995+- {
1996+- dndWindow->saveWc ().x = dndWindow->saveWc ().x % screen->width ();
1997+- if (dndWindow->saveWc ().x < 0)
1998+- dndWindow->saveWc ().x += screen->width ();
1999+- }
2000+- if (dndWindow->saveMask () & CWY)
2001++ foreach (CompWindow *dndWindow, dndWindows)
2002+ {
2003+- dndWindow->saveWc ().y = dndWindow->saveWc ().y % screen->height ();
2004+- if (dndWindow->saveWc ().y < 0)
2005+- dndWindow->saveWc ().y += screen->height ();
2006+- }
2007+-
2008+- /* update window attibutes to make sure a moved maximized window
2009+- is properly snapped to the work area */
2010+- if (dndWindow->state () & MAXIMIZE_STATE)
2011+- dndWindow->updateAttributes (CompStackingUpdateModeNone);
2012+-
2013+-#if 0 /* FIXME: obsolete in the meantime? */
2014+- {
2015+- int lastOutput;
2016+- int centerX, centerY;
2017++ if (dndWindow->grabbed ())
2018++ {
2019++ dndWindow->syncPosition ();
2020++ dndWindow->ungrabNotify ();
2021+
2022+- /* make sure we snap to the correct output */
2023+- lastOutput = s->currentOutputDev;
2024+- centerX = (WIN_X (w) + WIN_W (w) / 2) % s->width;
2025+- if (centerX < 0)
2026+- centerX += s->width;
2027+- centerY = (WIN_Y (w) + WIN_H (w) / 2) % s->height;
2028+- if (centerY < 0)
2029+- centerY += s->height;
2030++ screen->updateGrab (grabIndex, None);
2031+
2032+- s->currentOutputDev = outputDeviceForPoint (s, centerX, centerY);
2033++ screen->moveViewport (screen->vp ().x () - selectedVp.x (),
2034++ screen->vp ().y () - selectedVp.y (), true);
2035+
2036+- updateWindowAttributes (w, CompStackingUpdateModeNone);
2037++ /* update saved window attributes in case we moved the
2038++ window to a new viewport */
2039++ if (dndWindow->saveMask () & CWX)
2040++ {
2041++ dndWindow->saveWc ().x = dndWindow->saveWc ().x % screen->width ();
2042++ if (dndWindow->saveWc ().x < 0)
2043++ dndWindow->saveWc ().x += screen->width ();
2044++ }
2045++ if (dndWindow->saveMask () & CWY)
2046++ {
2047++ dndWindow->saveWc ().y = dndWindow->saveWc ().y % screen->height ();
2048++ if (dndWindow->saveWc ().y < 0)
2049++ dndWindow->saveWc ().y += screen->height ();
2050++ }
2051+
2052+- s->currentOutputDev = lastOutput;
2053++ /* update window attibutes to make sure a moved maximized window
2054++ is properly snapped to the work area */
2055++ if (dndWindow->state () & MAXIMIZE_STATE)
2056++ dndWindow->updateAttributes (CompStackingUpdateModeNone);
2057++ }
2058+ }
2059+-#endif
2060+ }
2061+
2062+ void
2063+@@ -402,6 +390,80 @@
2064+ screen->handleEvent (event);
2065+ }
2066+
2067++bool
2068++ExpoWindow::dragged () const
2069++{
2070++ ExpoScreen *es = ExpoScreen::get (screen);
2071++
2072++ return std::find (es->dndWindows.begin (), es->dndWindows.end (), window) != es->dndWindows.end ();
2073++}
2074++
2075++const compiz::window::Geometry &
2076++ExpoWindow::absoluteGeometry () const
2077++{
2078++ const compiz::window::Geometry &relativeGeometry (window->geometry ());
2079++ mAbsoluteGeometry.set ((screen->vp ().x () * screen->width ()) + relativeGeometry.x (),
2080++ (screen->vp ().y () * screen->height ()) + relativeGeometry.y (),
2081++ relativeGeometry.width (),
2082++ relativeGeometry.height (),
2083++ relativeGeometry.border ());
2084++
2085++ return mAbsoluteGeometry;
2086++}
2087++
2088++bool
2089++ExpoWindow::isDesktopOrDock () const
2090++{
2091++ return window->type () == CompWindowTypeDesktopMask ||
2092++ window->type () == CompWindowTypeDockMask;
2093++}
2094++
2095++namespace cei = compiz::expo::impl;
2096++
2097++cei::CompizClientListGenerator::CompizClientListGenerator (CompScreen *screen) :
2098++ mScreen (screen),
2099++ mClientList (&mScreen->clientList (true)),
2100++ mClientListIterator (mClientList->begin ())
2101++{
2102++}
2103++
2104++compiz::expo::ViewportMemberWindow *
2105++cei::CompizClientListGenerator::nextClient ()
2106++{
2107++ if (mClientListIterator == mClientList->end ())
2108++ return NULL;
2109++
2110++ compiz::expo::ViewportMemberWindow *vpMemberWindow = ExpoWindow::get (*mClientListIterator);
2111++
2112++ ++mClientListIterator;
2113++
2114++ return vpMemberWindow;
2115++}
2116++
2117++bool
2118++ExpoScreen::windowsOnVp (compiz::expo::ClientListGenerator &clientList,
2119++ CompPoint &p,
2120++ const CompPoint &unprojectedCursor,
2121++ const CompSize &screenSize,
2122++ CompScreen *screen)
2123++{
2124++ return false;
2125++}
2126++
2127++namespace
2128++{
2129++ void fillInNewViewportActivityData (unsigned int vpCount,
2130++ std::vector <float> &vpActivity)
2131++ {
2132++ if (vpActivity.size () < vpCount)
2133++ {
2134++ vpActivity.resize (vpCount);
2135++ foreach (float& activity, vpActivity)
2136++ activity = 1.0f;
2137++ }
2138++ }
2139++}
2140++
2141+ void
2142+ ExpoScreen::preparePaint (int msSinceLastPaint)
2143+ {
2144+@@ -412,33 +474,42 @@
2145+ else
2146+ expoCam = MAX (0.0, expoCam - val);
2147+
2148+- if (expoCam)
2149++ if (dndState == DnDDuring)
2150+ {
2151+- unsigned int i, j, vp;
2152+- unsigned int vpCount = screen->vpSize ().width () *
2153+- screen->vpSize ().height ();
2154++ foreach (CompWindow *w, dndWindows)
2155++ ExpoWindow::get (w)->dndOpacity = MIN (1.0, ExpoWindow::get (w)->dndOpacity + val);
2156++ }
2157++ else if (dndState == DnDNone)
2158++ {
2159++ CompWindowList::iterator it = dndWindows.begin ();
2160+
2161+- if (vpActivity.size () < vpCount)
2162++ while (it != dndWindows.end ())
2163+ {
2164+- vpActivity.resize (vpCount);
2165+- foreach (float& activity, vpActivity)
2166+- activity = 1.0f;
2167+- }
2168++ ExpoWindow::get ((*it))->dndOpacity = MAX (0.0, ExpoWindow::get ((*it))->dndOpacity - val);
2169+
2170+- for (i = 0; i < (unsigned int) screen->vpSize ().width (); i++)
2171+- {
2172+- for (j = 0; j < (unsigned int) screen->vpSize ().height (); j++)
2173++ if (ExpoWindow::get ((*it))->dndOpacity <= 0.0f)
2174+ {
2175+- vp = (j * screen->vpSize ().width ()) + i;
2176+-
2177+- if (CompPoint (i, j) == selectedVp)
2178+- vpActivity[vp] = MIN (1.0, vpActivity[vp] + val);
2179+- else
2180+- vpActivity[vp] = MAX (0.0, vpActivity[vp] - val);
2181++ dndWindows.erase (it);
2182++ it = dndWindows.begin ();
2183+ }
2184++ else
2185++ it++;
2186+ }
2187++ }
2188+
2189+- for (i = 0; i < 360; i++)
2190++ if (expoCam)
2191++ {
2192++ unsigned int vpCount = compiz::expo::countViewports (screen->vpSize ());
2193++
2194++ fillInNewViewportActivityData (vpCount, vpActivity);
2195++
2196++ for (unsigned int i = 0; i < vpCount; i++)
2197++ if (vpActive[i])
2198++ vpActivity[i] = MIN (1.0, vpActivity[i] + val);
2199++ else
2200++ vpActivity[i] = MAX (0.0, vpActivity[i] - val);
2201++
2202++ for (int i = 0; i < 360; i++)
2203+ {
2204+ float fi = (float) i;
2205+
2206+@@ -509,6 +580,31 @@
2207+ cScreen->paint (outputs, mask);
2208+ }
2209+
2210++namespace
2211++{
2212++ void updateViewportActiveStates (CompScreen *screen)
2213++ {
2214++ ExpoScreen *es = ExpoScreen::get (screen);
2215++
2216++ unsigned int vpCount = compiz::expo::countViewports (screen->vpSize ());
2217++ fillInNewViewportActivityData (vpCount, es->vpActivity);
2218++
2219++ for (int i = 0; i < screen->vpSize ().width (); i++)
2220++ {
2221++ for (int j = 0; j < screen->vpSize ().height (); j++)
2222++ {
2223++ compiz::expo::impl::CompizClientListGenerator clientList (screen);
2224++
2225++ compiz::expo::activeViewportsForMembers (clientList,
2226++ es->newCursor,
2227++ screen->vpSize (),
2228++ *screen,
2229++ es->vpActive);
2230++ }
2231++ }
2232++ }
2233++}
2234++
2235+ void
2236+ ExpoScreen::donePaint ()
2237+ {
2238+@@ -539,6 +635,11 @@
2239+ foreach (float& vp, vpActivity)
2240+ if (vp != 0.0 && vp != 1.0)
2241+ cScreen->damageScreen ();
2242++
2243++ foreach (CompWindow *w, dndWindows)
2244++ if (ExpoWindow::get (w)->dndOpacity != 0.0f &&
2245++ ExpoWindow::get (w)->dndOpacity != 1.0f)
2246++ cScreen->damageScreen ();
2247+ }
2248+
2249+ if (grabIndex && expoCam <= 0.0f && !expoMode)
2250+@@ -553,10 +654,25 @@
2251+ switch (dndState) {
2252+ case DnDDuring:
2253+ {
2254+- if (dndWindow)
2255+- dndWindow->move (newCursor.x () - prevCursor.x (),
2256+- newCursor.y () - prevCursor.y (),
2257+- optionGetExpoImmediateMove ());
2258++ if (dndWindows.size ())
2259++ {
2260++ foreach (CompWindow *dndWindow, dndWindows)
2261++ {
2262++ if (dndWindow->grabbed ())
2263++ {
2264++ ExpoWindow *ew = ExpoWindow::get (dndWindow);
2265++
2266++ /* No need to update twice */
2267++ dndWindow->moveNotifySetEnabled (ew, false);
2268++ dndWindow->move (newCursor.x () - prevCursor.x (),
2269++ newCursor.y () - prevCursor.y (),
2270++ optionGetExpoImmediateMove ());
2271++ dndWindow->moveNotifySetEnabled (ew, true);
2272++
2273++ updateViewportActiveStates (screen);
2274++ }
2275++ }
2276++ }
2277+
2278+ prevCursor = newCursor;
2279+ cScreen->damageScreen ();
2280+@@ -621,13 +737,13 @@
2281+ break;
2282+
2283+ dndState = DnDDuring;
2284+- dndWindow = w;
2285++ dndWindows.push_back (w);
2286+
2287+ w->grabNotify (nx, ny, 0,
2288+ CompWindowGrabMoveMask |
2289+ CompWindowGrabButtonMask);
2290+
2291+- screen->updateGrab (grabIndex, dragCursor);
2292++ screen->updateGrab (grabIndex, mMoveCursor);
2293+
2294+ w->raise ();
2295+ w->moveInputFocusTo ();
2296+@@ -762,6 +878,124 @@
2297+ }
2298+
2299+ void
2300++ExpoScreen::paintViewport (const GLScreenPaintAttrib& attrib,
2301++ const GLMatrix& transform,
2302++ const CompRegion& region,
2303++ CompOutput *output,
2304++ unsigned int mask,
2305++ CompPoint vpPos,
2306++ GLVector &vpCamPos,
2307++ bool reflection)
2308++{
2309++ GLMatrix sTransform (transform);
2310++ GLMatrix sTransform2, sTransform3;
2311++ float sx = (float) screen->width () / output->width ();
2312++ float sy = (float) screen->height () / output->height ();
2313++ float vpp;
2314++ float progress = sigmoidProgress (expoCam);
2315++ unsigned int vp;
2316++ CompPoint vpSize (screen->vpSize ().width (), screen->vpSize ().height ());
2317++
2318++ const float gapY = optionGetVpDistance () * 0.1f * expoCam;
2319++ const float gapX = optionGetVpDistance () * 0.1f * screen->height () /
2320++ screen->width () * expoCam;
2321++
2322++ /* not sure this will work with different resolutions */
2323++ sTransform.translate (0.0, MAX (0, vpPos.y ()) * -(sy + gapY), 0.0f);
2324++
2325++ sTransform2 = sTransform;
2326++
2327++ /* not sure this will work with different resolutions */
2328++ if (optionGetDeform () != DeformCurve)
2329++ sTransform2.translate (MAX (0, vpPos.x ()) * (sx + gapX), 0.0f, 0.0);
2330++
2331++
2332++ if (optionGetExpoAnimation () == ExpoAnimationVortex)
2333++ sTransform2.rotate (360 * expoCam,
2334++ 0.0f, 1.0f, 2.0f * expoCam);
2335++
2336++ sTransform3 = sTransform2;
2337++
2338++ sTransform3.translate (output->x () / output->width (),
2339++ -output->y () / output->height (), 0.0);
2340++
2341++ cScreen->setWindowPaintOffset ((screen->vp ().x () - vpPos.x ()) *
2342++ screen->width (),
2343++ (screen->vp ().y () - vpPos.y ()) *
2344++ screen->height ());
2345++
2346++ vp = (vpPos.y () * vpSize.x ()) + vpPos.x ();
2347++
2348++ vpp = (expoCam * vpActivity[vp]) + (1 - expoCam);
2349++ vpp = sigmoidProgress (vpp);
2350++
2351++ vpBrightness = vpp + ((1.0 - vpp) *
2352++ optionGetVpBrightness () / 100.0);
2353++ vpSaturation = vpp + ((1.0 - vpp) *
2354++ optionGetVpSaturation () / 100.0);
2355++
2356++ paintingVp = vpPos;
2357++
2358++ if (optionGetDeform () == DeformCurve)
2359++ {
2360++ float rotateX;
2361++
2362++ sTransform3.translate (-vpCamPos[GLVector::x], 0.0f,
2363++ curveDistance - DEFAULT_Z_CAMERA);
2364++
2365++ rotateX = -vpPos.x () + interpolate (((float) vpSize.x () / 2.0) - 0.5,
2366++ screen->vp ().x (), progress);
2367++
2368++ sTransform3.rotate (curveAngle * rotateX, 0.0, 1.0, 0.0);
2369++
2370++ sTransform3.translate (vpCamPos[GLVector::x], 0.0f,
2371++ DEFAULT_Z_CAMERA - curveDistance);
2372++ }
2373++
2374++ if (paintingDndWindow)
2375++ cScreen->getWindowPaintListSetEnabled (this, true);
2376++ gScreen->glPaintTransformedOutput (attrib, sTransform3,
2377++ screen->region (), output,
2378++ mask);
2379++
2380++ if (paintingDndWindow)
2381++ cScreen->getWindowPaintListSetEnabled (this, false);
2382++
2383++ if (!reflection && !paintingDndWindow)
2384++ {
2385++ int cursor[2] = { pointerX, pointerY };
2386++
2387++ invertTransformedVertex (attrib, sTransform3,
2388++ output, cursor);
2389++
2390++ if ((cursor[0] > 0) && (cursor[0] < (int) screen->width ()) &&
2391++ (cursor[1] > 0) && (cursor[1] < (int) screen->height ()))
2392++ {
2393++ newCursor.setX (vpPos.x () * screen->width () + cursor[0]);
2394++ newCursor.setY (vpPos.y () * screen->height () + cursor[1]);
2395++
2396++ if (anyClick || dndState != DnDNone)
2397++ {
2398++ /* Used to save last viewport interaction was in */
2399++ selectedVp = vpPos;
2400++ anyClick = false;
2401++ }
2402++ }
2403++ }
2404++
2405++ /* Calculate the current viewport size */
2406++ int tl[2] = { 0, 0 };
2407++ int br[2] = { screen->width (), screen->height () };
2408++
2409++ invertTransformedVertex (attrib, sTransform3, output, tl);
2410++ invertTransformedVertex (attrib, sTransform3, output, br);
2411++
2412++ viewport_size = CompSize (br[0] - tl[0], br[1] - tl[1]);
2413++
2414++ cScreen->setWindowPaintOffset (0, 0);
2415++}
2416++
2417++void
2418+ ExpoScreen::paintWall (const GLScreenPaintAttrib& attrib,
2419+ const GLMatrix& transform,
2420+ const CompRegion& region,
2421+@@ -772,13 +1006,11 @@
2422+ GLfloat vertexData[12];
2423+ GLushort colorData[16];
2424+ GLMatrix sTransformW, sTransform (transform);
2425+- int i, j, vp;
2426+ GLenum oldFilter = gScreen->textureFilter ();
2427+-
2428+- float sx = (float) screen->width () / output->width ();
2429+- float sy = (float) screen->height () / output->height ();
2430++ float sx = (float) screen->width () / output->width ();
2431++ float sy = (float) screen->height () / output->height ();
2432+ float biasZ;
2433+- float oScale, rotation = 0.0f, progress, vpp;
2434++ float oScale, rotation = 0.0f, progress;
2435+ float aspectX = 1.0f, aspectY = 1.0f;
2436+ GLVector cam;
2437+ CompPoint vpSize (screen->vpSize ().width (), screen->vpSize ().height ());
2438+@@ -910,9 +1142,24 @@
2439+ sTransform.rotate (rotation, 0.0f, 1.0f, 0.0f);
2440+ sTransform.scale (aspectX, aspectY, 1.0);
2441+
2442++ CompPoint offsetInScreenCoords (optionGetXOffset (),
2443++ optionGetYOffset ());
2444++ float offsetInWorldCoordX, offsetInWorldCoordY, worldScaleFactorX, worldScaleFactorY;
2445++
2446++ compiz::expo::calculateWallOffset (*output,
2447++ offsetInScreenCoords,
2448++ vpSize,
2449++ *screen,
2450++ offsetInWorldCoordX,
2451++ offsetInWorldCoordY,
2452++ worldScaleFactorX,
2453++ worldScaleFactorY,
2454++ sigmoidProgress (expoCam));
2455++
2456+ /* translate expo to center */
2457+- sTransform.translate (vpSize.x () * sx * -0.5,
2458+- vpSize.y () * sy * 0.5, 0.0f);
2459++ sTransform.translate (vpSize.x () * sx * -0.5 + offsetInWorldCoordX,
2460++ vpSize.y () * sy * 0.5 - offsetInWorldCoordY, 0.0f);
2461++ sTransform.scale (worldScaleFactorX, worldScaleFactorY, 1.0f);
2462+
2463+ if (optionGetDeform () == DeformCurve)
2464+ sTransform.translate ((vpSize.x () - 1) * sx * 0.5, 0.0, 0.0);
2465+@@ -936,90 +1183,29 @@
2466+
2467+ expoActive = true;
2468+
2469+- for (j = 0; j < vpSize.y (); j++)
2470+- {
2471+- GLMatrix sTransform2 (sTransform), sTransform3;
2472+-
2473+- for (i = 0; i < vpSize.x (); i++)
2474+- {
2475+- if (optionGetExpoAnimation () == ExpoAnimationVortex)
2476+- sTransform2.rotate (360 * expoCam,
2477+- 0.0f, 1.0f, 2.0f * expoCam);
2478+-
2479+- sTransform3 = sTransform2;
2480+-
2481+- sTransform3.translate (output->x () / output->width (),
2482+- -output->y () / output->height (), 0.0);
2483+-
2484+- cScreen->setWindowPaintOffset ((screen->vp ().x () - i) *
2485+- screen->width (),
2486+- (screen->vp ().y () - j) *
2487+- screen->height ());
2488+-
2489+- vp = (j * vpSize.x ()) + i;
2490+-
2491+- vpp = (expoCam * vpActivity[vp]) + (1 - expoCam);
2492+- vpp = sigmoidProgress (vpp);
2493+-
2494+- vpBrightness = vpp + ((1.0 - vpp) *
2495+- optionGetVpBrightness () / 100.0);
2496+- vpSaturation = vpp + ((1.0 - vpp) *
2497+- optionGetVpSaturation () / 100.0);
2498++ for (int j = 0; j < screen->vpSize ().height (); j++)
2499++ for (int i = 0; i < screen->vpSize().width (); i++)
2500++ paintViewport (attrib, sTransform, region, output, mask, CompPoint (i, j), vpCamPos, reflection);
2501+
2502+- paintingVp.set (i, j);
2503++ paintingDndWindow = true;
2504+
2505+- if (optionGetDeform () == DeformCurve)
2506+- {
2507+- float rotateX;
2508+-
2509+- sTransform3.translate (-vpCamPos[GLVector::x], 0.0f,
2510+- curveDistance - DEFAULT_Z_CAMERA);
2511+-
2512+- rotateX = -i + interpolate (((float) vpSize.x () / 2.0) - 0.5,
2513+- screen->vp ().x (), progress);
2514+-
2515+- sTransform3.rotate (curveAngle * rotateX, 0.0, 1.0, 0.0);
2516+-
2517+- sTransform3.translate (vpCamPos[GLVector::x], 0.0f,
2518+- DEFAULT_Z_CAMERA - curveDistance);
2519+- }
2520+-
2521+- gScreen->glPaintTransformedOutput (attrib, sTransform3,
2522+- screen->region (), output,
2523+- mask);
2524+-
2525+- if (!reflection)
2526+- {
2527+- int cursor[2] = { pointerX, pointerY };
2528++ foreach (CompWindow *dndWindow, dndWindows)
2529++ {
2530++ CompPoint vp;
2531+
2532+- invertTransformedVertex (attrib, sTransform3,
2533+- output, cursor);
2534++ screen->viewportForGeometry (dndWindow->geometry (), vp);
2535+
2536+- if ((cursor[0] > 0) && (cursor[0] < (int) screen->width ()) &&
2537+- (cursor[1] > 0) && (cursor[1] < (int) screen->height ()))
2538+- {
2539+- newCursor.setX (i * screen->width () + cursor[0]);
2540+- newCursor.setY (j * screen->height () + cursor[1]);
2541++ while (vp.x () < 0)
2542++ vp.setX (screen->vpSize ().width () + vp.x ());
2543+
2544+- if (anyClick || dndState != DnDNone)
2545+- {
2546+- /* Used to save last viewport interaction was in */
2547+- lastSelectedVp = selectedVp;
2548+- selectedVp.set (i, j);
2549+- anyClick = false;
2550+- }
2551+- }
2552+- }
2553++ while (vp.y () < 0)
2554++ vp.setY (screen->vpSize ().height () + vp.y ());
2555+
2556+- /* not sure this will work with different resolutions */
2557+- if (optionGetDeform () != DeformCurve)
2558+- sTransform2.translate (sx + gapX, 0.0f, 0.0);
2559+- }
2560+-
2561+- /* not sure this will work with different resolutions */
2562+- sTransform.translate (0.0, -(sy + gapY), 0.0f);
2563++ paintViewport (attrib, sTransform, infiniteRegion, output, mask, vp, vpCamPos, reflection);
2564+ }
2565+
2566++ paintingDndWindow = false;
2567++
2568+ // glNormal3f (0.0, 0.0, -1.0);
2569+
2570+ if (reflection)
2571+@@ -1187,12 +1373,16 @@
2572+
2573+ expoActive = false;
2574+
2575+- cScreen->setWindowPaintOffset (0, 0);
2576+-
2577+ gScreen->glPaintTransformedOutputSetCurrentIndex (glPaintTransformedOutputIndex);
2578+ gScreen->setTextureFilter (oldFilter);
2579+ }
2580+
2581++const CompWindowList &
2582++ExpoScreen::getWindowPaintList ()
2583++{
2584++ return dndWindows;
2585++}
2586++
2587+ bool
2588+ ExpoScreen::glPaintOutput (const GLScreenPaintAttrib& attrib,
2589+ const GLMatrix& transform,
2590+@@ -1243,10 +1433,15 @@
2591+
2592+ bool
2593+ ExpoWindow::glDraw (const GLMatrix& transform,
2594+- const GLWindowPaintAttrib &attrib,
2595++ const GLWindowPaintAttrib &attrib,
2596+ const CompRegion& region,
2597+ unsigned int mask)
2598+ {
2599++ GLMatrix wTransform (transform);
2600++ CompPoint vp;
2601++
2602++ screen->viewportForGeometry (window->geometry (), vp);
2603++
2604+ if (eScreen->expoCam == 0.0f)
2605+ return gWindow->glDraw (transform, attrib, region, mask);
2606+
2607+@@ -1275,8 +1470,11 @@
2608+ }
2609+ }
2610+
2611+- eAttrib.brightness = attrib.brightness * eScreen->vpBrightness;
2612+- eAttrib.saturation = attrib.saturation * eScreen->vpSaturation;
2613++ if ((vp == eScreen->paintingVp || window->onAllViewports ()) && !eScreen->paintingDndWindow)
2614++ {
2615++ eAttrib.brightness = attrib.brightness * eScreen->vpBrightness;
2616++ eAttrib.saturation = attrib.saturation * eScreen->vpSaturation;
2617++ }
2618+ }
2619+ else
2620+ {
2621+@@ -1287,7 +1485,79 @@
2622+ (1 - sigmoidProgress (eScreen->expoCam));
2623+ }
2624+
2625+- return gWindow->glDraw (transform, eAttrib, region, mask);
2626++ bool status = gWindow->glDraw (transform, eAttrib, region, mask);
2627++
2628++ if (window->type () & CompWindowTypeDesktopMask)
2629++ {
2630++ /* We want to set the geometry of the polka dots to the window
2631++ * region */
2632++ CompRegion reg = CompRegion (0, 0, window->width (), window->height ());
2633++
2634++ foreach(GLTexture * tex, eScreen->polkadots_texture)
2635++ {
2636++ GLTexture::MatrixList matl;
2637++ GLTexture::Matrix mat = tex->matrix();
2638++ CompRegion paintRegion(region);
2639++
2640++ float xScale = screen->width () / (float) eScreen->viewport_size.width ();
2641++ float yScale = screen->height () / (float) eScreen->viewport_size.height ();
2642++
2643++ mat.xx *= xScale;
2644++ mat.yy *= yScale;
2645++
2646++ /* Not sure what this does, but it is necessary
2647++ * (adjusts for scale?) */
2648++ mat.x0 -= mat.xx * reg.boundingRect().x1();
2649++ mat.y0 -= mat.yy * reg.boundingRect().y1();
2650++
2651++ matl.push_back(mat);
2652++
2653++ if (mask & PAINT_WINDOW_TRANSFORMED_MASK)
2654++ paintRegion = infiniteRegion;
2655++
2656++ /* Now allow plugins to mess with the geometry of our
2657++ * dim (so we get a nice render for things like
2658++ * wobbly etc etc */
2659++ gWindow->vertexBuffer ()->begin ();
2660++ gWindow->glAddGeometry (matl, reg, paintRegion);
2661++ if (gWindow->vertexBuffer ()->end ())
2662++ {
2663++ unsigned int glDrawTextureIndex = gWindow->glDrawTextureGetCurrentIndex ();
2664++ eAttrib.opacity = attrib.opacity * (((1.0 - eScreen->vpBrightness) + (1.0 - eScreen->vpSaturation) / 2.0));
2665++ /* Texture rendering set-up */
2666++ //eScreen->gScreen->setTexEnvMode(GL_MODULATE);
2667++ glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
2668++ /* Draw the dim texture with all of it's modified
2669++ * geometry glory */
2670++ gWindow->glDrawTextureSetCurrentIndex (MAXSHORT);
2671++ gWindow->glDrawTexture (tex, transform, eAttrib, mask |
2672++ PAINT_WINDOW_BLEND_MASK |
2673++ PAINT_WINDOW_TRANSLUCENT_MASK |
2674++ PAINT_WINDOW_TRANSFORMED_MASK);
2675++ gWindow->glDrawTextureSetCurrentIndex (glDrawTextureIndex);
2676++ /* Texture rendering tear-down */
2677++ glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
2678++ eScreen->gScreen->setTexEnvMode (GL_REPLACE);
2679++ }
2680++ }
2681++
2682++ /* Paint the outline */
2683++ if (mGlowQuads && eScreen->paintingVp == eScreen->selectedVp)
2684++ {
2685++ if (region.numRects ())
2686++ {
2687++ /* reset geometry and paint */
2688++ gWindow->vertexBuffer ()->begin ();
2689++ gWindow->vertexBuffer ()->end ();
2690++
2691++ paintGlow (transform, attrib, infiniteRegion, mask);
2692++ }
2693++ }
2694++
2695++ }
2696++
2697++ return status;
2698++
2699+ }
2700+
2701+ #define EXPO_GRID_SIZE 100
2702+@@ -1425,11 +1695,17 @@
2703+ const CompRegion& region,
2704+ unsigned int mask)
2705+ {
2706++ GLMatrix wTransform (transform);
2707++ GLWindowPaintAttrib wAttrib (attrib);
2708++ CompRegion clip (region);
2709++
2710+ if (eScreen->expoActive)
2711+ {
2712+ float opacity = 1.0;
2713+ bool hide;
2714+ bool zoomAnim;
2715++ CompPoint vp;
2716++ screen->viewportForGeometry (window->geometry (), vp);
2717+
2718+ zoomAnim = eScreen->optionGetExpoAnimation () ==
2719+ ExpoScreen::ExpoAnimationZoom;
2720+@@ -1458,9 +1734,47 @@
2721+
2722+ if (opacity <= 0)
2723+ mask |= PAINT_WINDOW_NO_CORE_INSTANCE_MASK;
2724++ else
2725++ wAttrib.opacity = wAttrib.opacity * opacity;
2726++
2727++ /* Stretch maximized windows a little so that you don't
2728++ * have an awkward gap */
2729++
2730++ if (window->state () & MAXIMIZE_STATE &&
2731++ !window->border ().top)
2732++ {
2733++ CompOutput *o = &screen->outputDevs ()[screen->outputDeviceForGeometry(window->geometry())];
2734++ float yS = 1.0 + ((o->height () / (float) window->height ()) - 1.0f) * sigmoidProgress (eScreen->expoCam);
2735++ float xS = 1.0 + ((o->width () / (float) window->width ()) - 1.0f) * sigmoidProgress (eScreen->expoCam);
2736++ wTransform.translate (window->x () + window->width (),
2737++ window->y () + window->height (),
2738++ 0.0f);
2739++ wTransform.scale (xS, yS, 1.0f);
2740++ wTransform.translate (-(window->x () + window->width ()),
2741++ -(window->y () + window->height ()),
2742++ 0.0f);
2743++
2744++ if (eScreen->paintingVp != vp)
2745++ mask |= PAINT_WINDOW_NO_CORE_INSTANCE_MASK;
2746++
2747++ mask |= PAINT_WINDOW_TRANSFORMED_MASK;
2748++ }
2749++
2750++ if (std::find (eScreen->dndWindows.begin(), eScreen->dndWindows.end (), window) != eScreen->dndWindows.end ())
2751++ {
2752++ if (!eScreen->paintingDndWindow)
2753++ {
2754++ mask |= PAINT_WINDOW_NO_CORE_INSTANCE_MASK;
2755++ }
2756++ else
2757++ {
2758++ mask |= PAINT_WINDOW_TRANSFORMED_MASK;
2759++ clip = infiniteRegion;
2760++ }
2761++ }
2762+ }
2763+
2764+- return gWindow->glPaint (attrib, transform, region, mask);
2765++ return gWindow->glPaint (wAttrib, wTransform, clip, mask);
2766+ }
2767+
2768+ bool
2769+@@ -1489,7 +1803,7 @@
2770+ expoActive (false),
2771+ expoMode (false),
2772+ dndState (DnDNone),
2773+- dndWindow (NULL),
2774++ dndWindows (0),
2775+ origVp (s->vp ()),
2776+ selectedVp (s->vp ()),
2777+ lastSelectedVp (s->vp ()),
2778+@@ -1497,14 +1811,21 @@
2779+ clickTime (0),
2780+ doubleClick (false),
2781+ vpNormals (360 * 3),
2782+- grabIndex (0)
2783+-{
2784++ grabIndex (0),
2785++ paintingDndWindow (false),
2786++ mGlowTextureProperties (&glowTextureProperties)
2787++{
2788++ CompString fname;
2789++ CompString pname = "expo";
2790++ CompSize size;
2791++
2792++
2793+ leftKey = XKeysymToKeycode (s->dpy (), XStringToKeysym ("Left"));
2794+ rightKey = XKeysymToKeycode (s->dpy (), XStringToKeysym ("Right"));
2795+ upKey = XKeysymToKeycode (s->dpy (), XStringToKeysym ("Up"));
2796+ downKey = XKeysymToKeycode (s->dpy (), XStringToKeysym ("Down"));
2797+
2798+- dragCursor = XCreateFontCursor (screen->dpy (), XC_fleur);
2799++ mMoveCursor = XCreateFontCursor (screen->dpy (), XC_fleur);
2800+
2801+ EXPOINITBIND (ExpoKey, doExpo);
2802+ EXPOTERMBIND (ExpoKey, termExpo);
2803+@@ -1522,12 +1843,58 @@
2804+ ScreenInterface::setHandler (screen, false);
2805+ CompositeScreenInterface::setHandler (cScreen, false);
2806+ GLScreenInterface::setHandler (gScreen, false);
2807++
2808++ outline_texture = GLTexture::imageDataToTexture (mGlowTextureProperties->textureData,
2809++ CompSize (mGlowTextureProperties->textureSize,
2810++ mGlowTextureProperties->textureSize),
2811++ GL_RGBA, GL_UNSIGNED_BYTE);
2812++ fname = "texture_tile.png";
2813++ polkadots_texture = GLTexture::readImageToTexture (fname, pname, polkadots_texture_size);
2814++
2815++ if (polkadots_texture.empty ())
2816++ compLogMessage ("expo", CompLogLevelWarn, "failed to bind image to texture");
2817++ else
2818++ {
2819++ foreach (GLTexture *tex, polkadots_texture)
2820++ {
2821++ tex->enable (GLTexture::Good);
2822++ glTexParameteri (tex->target (), GL_TEXTURE_WRAP_S, GL_REPEAT);
2823++ glTexParameteri (tex->target (), GL_TEXTURE_WRAP_T, GL_REPEAT);
2824++ tex->disable ();
2825++ }
2826++ }
2827+ }
2828+
2829+ ExpoScreen::~ExpoScreen ()
2830+ {
2831+- if (dragCursor != None)
2832+- XFreeCursor (screen->dpy (), dragCursor);
2833++ if (mMoveCursor)
2834++ XFreeCursor (screen->dpy (), mMoveCursor);
2835++}
2836++
2837++void
2838++ExpoWindow::moveNotify (int dx, int dy, bool immediate)
2839++{
2840++ window->moveNotify (dx, dy, immediate);
2841++
2842++ if (!ExpoScreen::get (screen)->expoActive)
2843++ return;
2844++
2845++ updateViewportActiveStates (screen);
2846++}
2847++
2848++void
2849++ExpoWindow::resizeNotify(int dx, int dy, int dw, int dh)
2850++{
2851++ window->resizeNotify (dx, dy, dw, dh);
2852++
2853++ /* mGlowQuads contains positional info, so we need to recalc that */
2854++ if (mGlowQuads)
2855++ {
2856++ /* FIXME: we need to find a more multitexture friendly way
2857++ * of doing this */
2858++ GLTexture::Matrix tMat = eScreen->outline_texture.at (0)->matrix ();
2859++ computeGlowQuads (&tMat);
2860++ }
2861+ }
2862+
2863+ ExpoWindow::ExpoWindow (CompWindow *w) :
2864+@@ -1535,10 +1902,28 @@
2865+ window (w),
2866+ cWindow (CompositeWindow::get (w)),
2867+ gWindow (GLWindow::get (w)),
2868+- eScreen (ExpoScreen::get (screen))
2869++ eScreen (ExpoScreen::get (screen)),
2870++ dndOpacity (0.0f),
2871++ mGlowQuads (NULL)
2872+ {
2873+ CompositeWindowInterface::setHandler (cWindow, false);
2874+ GLWindowInterface::setHandler (gWindow, false);
2875++ WindowInterface::setHandler (window, true);
2876++
2877++ if (window->type () & CompWindowTypeDesktopMask)
2878++ {
2879++ foreach (GLTexture *tex, eScreen->outline_texture)
2880++ {
2881++ GLTexture::Matrix mat = tex->matrix ();
2882++ computeGlowQuads (&mat);
2883++ }
2884++ }
2885++}
2886++
2887++ExpoWindow::~ExpoWindow ()
2888++{
2889++ eScreen->dndWindows.remove (window);
2890++ computeGlowQuads (NULL);
2891+ }
2892+
2893+ bool
2894+Index: ubuntu/plugins/expo/src/expo.h
2895+===================================================================
2896+--- ubuntu.orig/plugins/expo/src/expo.h 2012-09-08 11:51:02.279175377 +0800
2897++++ ubuntu/plugins/expo/src/expo.h 2012-09-08 14:07:47.219861486 +0800
2898+@@ -30,6 +30,44 @@
2899+ #include <opengl/opengl.h>
2900+
2901+ #include "expo_options.h"
2902++#include "glow.h"
2903++#include "viewport-member-window.h"
2904++#include "client-list-generator.h"
2905++
2906++#define WIN_REAL_X(w) (w->x () - w->border ().left)
2907++#define WIN_REAL_Y(w) (w->y () - w->border ().top)
2908++#define WIN_REAL_WIDTH(w) (w->width () + 2 * w->geometry ().border () + \
2909++ w->border ().left + w->border ().right)
2910++#define WIN_REAL_HEIGHT(w) (w->height () + 2 * w->geometry ().border () + \
2911++ w->border ().top + w->border ().bottom)
2912++
2913++namespace compiz
2914++{
2915++ namespace expo
2916++ {
2917++ namespace impl
2918++ {
2919++ namespace ce = compiz::expo;
2920++
2921++ class CompizClientListGenerator :
2922++ public ce::ClientListGenerator
2923++ {
2924++ public:
2925++
2926++ CompizClientListGenerator (CompScreen *screen);
2927++
2928++ void refreshClientList ();
2929++ ViewportMemberWindow * nextClient ();
2930++
2931++ private:
2932++
2933++ CompScreen *mScreen;
2934++ const CompWindowVector *mClientList;
2935++ CompWindowVector::const_iterator mClientListIterator;
2936++ };
2937++ }
2938++ }
2939++}
2940+
2941+ class ExpoScreen :
2942+ public ScreenInterface,
2943+@@ -51,8 +89,10 @@
2944+ bool glPaintOutput (const GLScreenPaintAttrib&, const GLMatrix&,
2945+ const CompRegion&, CompOutput *, unsigned int);
2946+ void glPaintTransformedOutput (const GLScreenPaintAttrib&,
2947+- const GLMatrix&, const CompRegion&,
2948+- CompOutput *, unsigned int);
2949++ const GLMatrix&, const CompRegion&,
2950++ CompOutput*, unsigned int);
2951++
2952++ const CompWindowList & getWindowPaintList ();
2953+
2954+ bool dndInit (CompAction *, CompAction::State, CompOption::Vector&);
2955+ bool dndFini (CompAction *, CompAction::State, CompOption::Vector&);
2956+@@ -62,6 +102,8 @@
2957+ bool nextVp (CompAction *, CompAction::State, CompOption::Vector&);
2958+ bool prevVp (CompAction *, CompAction::State, CompOption::Vector&);
2959+
2960++ CompPoint currentViewport ();
2961++
2962+ typedef enum {
2963+ DnDNone,
2964+ DnDDuring,
2965+@@ -82,7 +124,7 @@
2966+ bool expoMode;
2967+
2968+ DnDState dndState;
2969+- CompWindow *dndWindow;
2970++ CompWindowList dndWindows;
2971+
2972+ CompPoint prevCursor;
2973+ CompPoint newCursor;
2974+@@ -94,6 +136,7 @@
2975+ CompPoint paintingVp;
2976+
2977+ std::vector<float> vpActivity;
2978++ std::vector<bool> vpActive;
2979+ float vpBrightness;
2980+ float vpSaturation;
2981+
2982+@@ -113,6 +156,17 @@
2983+
2984+ CompScreen::GrabHandle grabIndex;
2985+
2986++ GLTexture::List polkadots_texture;
2987++ CompSize polkadots_texture_size;
2988++ CompSize viewport_size;
2989++
2990++ GLTexture::List outline_texture;
2991++ CompSize outline_texture_size;
2992++
2993++ bool paintingDndWindow;
2994++
2995++ const GlowTextureProperties *mGlowTextureProperties;
2996++
2997+ private:
2998+ void moveFocusViewport (int, int);
2999+ void finishWindowMovement ();
3000+@@ -123,24 +177,45 @@
3001+ void paintWall (const GLScreenPaintAttrib&, const GLMatrix&,
3002+ const CompRegion&, CompOutput *, unsigned int, bool);
3003+
3004++ void paintViewport (const GLScreenPaintAttrib& attrib,
3005++ const GLMatrix& transform,
3006++ const CompRegion& region,
3007++ CompOutput *output,
3008++ unsigned int mask,
3009++ CompPoint vpPos,
3010++ GLVector &vpCamPos,
3011++ bool reflection);
3012++
3013++ bool windowsOnVp (compiz::expo::ClientListGenerator &clientList,
3014++ CompPoint &p,
3015++ const CompPoint &unprojectedCursor,
3016++ const CompSize &screenSize,
3017++ CompScreen *screen);
3018++
3019+ KeyCode leftKey;
3020+ KeyCode rightKey;
3021+ KeyCode upKey;
3022+ KeyCode downKey;
3023+
3024+- Cursor dragCursor;
3025++ Cursor mMoveCursor;
3026+ };
3027+
3028+ class ExpoWindow :
3029++ public compiz::expo::ViewportMemberWindow,
3030+ public CompositeWindowInterface,
3031+ public GLWindowInterface,
3032++ public WindowInterface,
3033+ public PluginClassHandler<ExpoWindow, CompWindow>
3034+ {
3035+ public:
3036+ ExpoWindow (CompWindow *);
3037++ ~ExpoWindow ();
3038+
3039+ bool damageRect (bool, const CompRect&);
3040+
3041++ void resizeNotify (int dx, int dy, int dw, int dh);
3042++ void moveNotify (int dx, int dy, bool immediate);
3043++
3044+ bool glDraw (const GLMatrix&, const GLWindowPaintAttrib&,
3045+ const CompRegion&, unsigned int);
3046+ bool glPaint (const GLWindowPaintAttrib&, const GLMatrix&,
3047+@@ -150,11 +225,31 @@
3048+ unsigned int, unsigned int);
3049+ void glDrawTexture (GLTexture*, const GLMatrix&,
3050+ const GLWindowPaintAttrib&, unsigned int);
3051++ void
3052++ paintGlow (const GLMatrix &transform,
3053++ const GLWindowPaintAttrib &attrib,
3054++ const CompRegion &paintRegion,
3055++ unsigned int mask);
3056++
3057++ void
3058++ computeGlowQuads (GLTexture::Matrix *matrix);
3059+
3060+ CompWindow *window;
3061+ CompositeWindow *cWindow;
3062+ GLWindow *gWindow;
3063+ ExpoScreen *eScreen;
3064++
3065++ float dndOpacity;
3066++
3067++ GlowQuad *mGlowQuads;
3068++
3069++ private:
3070++
3071++ bool isDesktopOrDock () const;
3072++ bool dragged () const;
3073++ const compiz::window::Geometry & absoluteGeometry () const;
3074++
3075++ mutable compiz::window::Geometry mAbsoluteGeometry;
3076+ };
3077+
3078+ class ExpoPluginVTable :
3079+Index: ubuntu/plugins/expo/src/glow.cpp
3080+===================================================================
3081+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
3082++++ ubuntu/plugins/expo/src/glow.cpp 2012-09-08 11:51:33.107328243 +0800
3083+@@ -0,0 +1,429 @@
3084++/**
3085++ *
3086++ * Compiz group plugin
3087++ *
3088++ * glow.cpp
3089++ *
3090++ * Copyright : (C) 2006-2010 by Patrick Niklaus, Roi Cohen,
3091++ * Danny Baumann, Sam Spilsbury
3092++ * Authors: Patrick Niklaus <patrick.niklaus@googlemail.com>
3093++ * Roi Cohen <roico.beryl@gmail.com>
3094++ * Danny Baumann <maniac@opencompositing.org>
3095++ * Sam Spilsbury <smspillaz@gmail.com>
3096++ *
3097++ *
3098++ * This program is free software; you can redistribute it and/or
3099++ * modify it under the terms of the GNU General Public License
3100++ * as published by the Free Software Foundation; either version 2
3101++ * of the License, or (at your option) any later version.
3102++ *
3103++ * This program is distributed in the hope that it will be useful,
3104++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3105++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3106++ * GNU General Public License for more details.
3107++ *
3108++ **/
3109++
3110++#include "expo.h"
3111++#include "group_glow.h"
3112++
3113++const GlowTextureProperties glowTextureProperties = {
3114++ /* GlowTextureRectangular */
3115++ glowTexRect, 32, 21
3116++};
3117++
3118++/*
3119++ * GroupWindow::paintGlow
3120++ *
3121++ * Takes our glow texture, stretches the appropriate positions in the glow texture,
3122++ * adds those geometries (so plugins like wobby and deform this texture correctly)
3123++ * and then draws the glow texture with this geometry (plugins like wobbly and friends
3124++ * will automatically deform the texture based on our set geometry)
3125++ */
3126++
3127++void
3128++ExpoWindow::paintGlow (const GLMatrix &transform,
3129++ const GLWindowPaintAttrib &attrib,
3130++ const CompRegion &paintRegion,
3131++ unsigned int mask)
3132++{
3133++ CompRegion reg;
3134++ int i;
3135++ GLushort colorData[4];
3136++ const GLushort *selColorData = ExpoScreen::get (screen)->optionGetSelectedColor ();
3137++ float alpha = (float) selColorData[3] / 65535.0f;
3138++
3139++ /* Premultiply color */
3140++ colorData[0] = selColorData[0] * alpha;
3141++ colorData[1] = selColorData[1] * alpha;
3142++ colorData[2] = selColorData[2] * alpha;
3143++ colorData[3] = selColorData[3];
3144++
3145++ gWindow->vertexBuffer ()->begin ();
3146++
3147++ /* There are 8 glow parts of the glow texture which we wish to paint
3148++ * separately with different transformations
3149++ */
3150++ for (i = 0; i < NUM_GLOWQUADS; i++)
3151++ {
3152++ /* Using precalculated quads here */
3153++ reg = CompRegion (mGlowQuads[i].mBox);
3154++
3155++ if (reg.boundingRect ().x1 () < reg.boundingRect ().x2 () &&
3156++ reg.boundingRect ().y1 () < reg.boundingRect ().y2 ())
3157++ {
3158++ GLTexture::MatrixList matl;
3159++ reg = CompRegion (reg.boundingRect ().x1 (),
3160++ reg.boundingRect ().y1 (),
3161++ reg.boundingRect ().width (),
3162++ reg.boundingRect ().height ());
3163++
3164++ matl.push_back (mGlowQuads[i].mMatrix);
3165++ /* Add color data for all 6 vertices of the quad */
3166++ for (int n = 0; n < 6; n++)
3167++ gWindow->vertexBuffer ()->addColors (1, colorData);
3168++ gWindow->glAddGeometry (matl, reg, paintRegion);
3169++ }
3170++ }
3171++
3172++ if (gWindow->vertexBuffer ()->end ())
3173++ {
3174++ //GLScreen::get (screen)->setTexEnvMode (GL_MODULATE);
3175++ glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
3176++
3177++ /* we use PAINT_WINDOW_TRANSFORMED_MASK here to force
3178++ the usage of a good texture filter */
3179++ foreach (GLTexture *tex, ExpoScreen::get (screen)->outline_texture)
3180++ {
3181++ gWindow->glDrawTexture (tex, transform, attrib, mask |
3182++ PAINT_WINDOW_BLEND_MASK |
3183++ PAINT_WINDOW_TRANSLUCENT_MASK |
3184++ PAINT_WINDOW_TRANSFORMED_MASK);
3185++ }
3186++
3187++ glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
3188++ GLScreen::get (screen)->setTexEnvMode (GL_REPLACE);
3189++ }
3190++}
3191++
3192++/*
3193++ * ExpoWindow::computeGlowQuads
3194++ *
3195++ * This function computures the matrix transformation required for each
3196++ * part of the glow texture which we wish to stretch to some rectangular
3197++ * dimentions
3198++ *
3199++ * There are eight quads different parts of the texture which we wish to
3200++ * paint here, the 4 sides and four corners, eg:
3201++ *
3202++ * ------------------
3203++ * | 1 | 4 | 6 |
3204++ * ------------- ------------------
3205++ * | 1 | 4 | 6 | | | | |
3206++ * ------------- | | | |
3207++ * | 2 | n | 7 | -> | 2 | n | 7 |
3208++ * ------------- | | | |
3209++ * | 3 | 5 | 8 | | | | |
3210++ * ------------- ------------------
3211++ * | 3 | 5 | 8 |
3212++ * ------------------
3213++ *
3214++ * In this example here, 2, 4, 5 and 7 are stretched, and the matrices for
3215++ * each quad rect adjusted accordingly for it's size compared to the original
3216++ * texture size.
3217++ *
3218++ * When we are adjusting the matrices here, the initial size of each corner has
3219++ * a size of of "1.0f", so according to 2x2 matrix rules,
3220++ * the scale factor is the inverse of the size of the glow (which explains
3221++ * while you will see here that matrix->xx is (1 / glowSize)
3222++ * where glowSize is the size the user specifies they want their glow to extend.
3223++ * (likewise, matrix->yy is adjusted similarly for corners and for top/bottom)
3224++ *
3225++ * matrix->x0 and matrix->y0 here are set to be the top left edge of the rect
3226++ * adjusted by the matrix scale factor (matrix->xx and matrix->yy)
3227++ *
3228++ */
3229++void
3230++ExpoWindow::computeGlowQuads (GLTexture::Matrix *matrix)
3231++{
3232++ CompRect *box;
3233++ int x1, x2, y1, y2;
3234++ GLTexture::Matrix *quadMatrix;
3235++ int glowSize, glowOffset;
3236++ CompWindow *w = window;
3237++
3238++ /* Passing NULL to this function frees the glow quads
3239++ * (so the window is not painted with glow) */
3240++
3241++ if (matrix)
3242++ {
3243++ if (!mGlowQuads)
3244++ mGlowQuads = new GlowQuad[NUM_GLOWQUADS];
3245++ if (!mGlowQuads)
3246++ return;
3247++ }
3248++ else
3249++ {
3250++ if (mGlowQuads)
3251++ {
3252++ delete[] mGlowQuads;
3253++ mGlowQuads = NULL;
3254++ }
3255++ return;
3256++ }
3257++
3258++ glowSize = 48;
3259++ glowOffset = (glowSize * ExpoScreen::get (screen)->mGlowTextureProperties->glowOffset /
3260++ ExpoScreen::get (screen)->mGlowTextureProperties->textureSize) + 1;
3261++
3262++ /* Top left corner */
3263++ box = &mGlowQuads[GLOWQUAD_TOPLEFT].mBox;
3264++ mGlowQuads[GLOWQUAD_TOPLEFT].mMatrix = *matrix;
3265++ quadMatrix = &mGlowQuads[GLOWQUAD_TOPLEFT].mMatrix;
3266++
3267++ /* Set the desired rect dimentions
3268++ * for the part of the glow we are painting */
3269++
3270++ x1 = WIN_REAL_X (w) - glowSize + glowOffset;
3271++ y1 = WIN_REAL_Y (w) - glowSize + glowOffset;
3272++
3273++ /* 2x2 Matrix here, adjust both x and y scale factors
3274++ * and the x and y position
3275++ *
3276++ * Scaling both parts of the texture in a positive direction
3277++ * here (left to right top to bottom)
3278++ *
3279++ * The base position (x0 and y0) here requires us to move backwards
3280++ * on the x and y dimentions by the calculated rect dimentions
3281++ * multiplied by the scale factors
3282++ */
3283++
3284++ quadMatrix->xx = 1.0f / glowSize;
3285++ quadMatrix->yy = 1.0f / (glowSize);
3286++ quadMatrix->x0 = -(x1 * quadMatrix->xx);
3287++ quadMatrix->y0 = -(y1 * quadMatrix->yy);
3288++
3289++ x2 = MIN (WIN_REAL_X (w) + glowOffset,
3290++ WIN_REAL_X (w) + (WIN_REAL_WIDTH (w) / 2));
3291++ y2 = MIN (WIN_REAL_Y (w) + glowOffset,
3292++ WIN_REAL_Y (w) + (WIN_REAL_HEIGHT (w) / 2));
3293++
3294++ *box = CompRect (x1, y1, x2 - x1, y2 - y1);
3295++
3296++ /* Top right corner */
3297++ box = &mGlowQuads[GLOWQUAD_TOPRIGHT].mBox;
3298++ mGlowQuads[GLOWQUAD_TOPRIGHT].mMatrix = *matrix;
3299++ quadMatrix = &mGlowQuads[GLOWQUAD_TOPRIGHT].mMatrix;
3300++
3301++ /* Set the desired rect dimentions
3302++ * for the part of the glow we are painting */
3303++
3304++ x1 = WIN_REAL_X (w) + WIN_REAL_WIDTH (w) - glowOffset;
3305++ y1 = WIN_REAL_Y (w) - glowSize + glowOffset;
3306++ x2 = WIN_REAL_X (w) + WIN_REAL_WIDTH (w) + glowSize - glowOffset;
3307++
3308++ /* 2x2 Matrix here, adjust both x and y scale factors
3309++ * and the x and y position
3310++ *
3311++ * Scaling the y part of the texture in a positive direction
3312++ * and the x part in a negative direction here
3313++ * (right to left top to bottom)
3314++ *
3315++ * The base position (x0 and y0) here requires us to move backwards
3316++ * on the y dimention and forwards on x by the calculated rect dimentions
3317++ * multiplied by the scale factors (since we are moving forward on x we
3318++ * need the inverse of that which is 1 - x1 * xx
3319++ */
3320++
3321++ quadMatrix->xx = -1.0f / glowSize;
3322++ quadMatrix->yy = 1.0f / glowSize;
3323++ quadMatrix->x0 = 1.0 - (x1 * quadMatrix->xx);
3324++ quadMatrix->y0 = -(y1 * quadMatrix->yy);
3325++
3326++ x1 = MAX (WIN_REAL_X (w) + WIN_REAL_WIDTH (w) - glowOffset,
3327++ WIN_REAL_X (w) + (WIN_REAL_WIDTH (w) / 2));
3328++ y2 = MIN (WIN_REAL_Y (w) + glowOffset,
3329++ WIN_REAL_Y (w) + (WIN_REAL_HEIGHT (w) / 2));
3330++
3331++ *box = CompRect (x1, y1, x2 - x1, y2 - y1);
3332++
3333++ /* Bottom left corner */
3334++ box = &mGlowQuads[GLOWQUAD_BOTTOMLEFT].mBox;
3335++ mGlowQuads[GLOWQUAD_BOTTOMLEFT].mMatrix = *matrix;
3336++ quadMatrix = &mGlowQuads[GLOWQUAD_BOTTOMLEFT].mMatrix;
3337++
3338++ x1 = WIN_REAL_X (w) - glowSize + glowOffset;
3339++ y1 = WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) - glowOffset;
3340++ x2 = WIN_REAL_X (w) + glowOffset;
3341++ y2 = WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) + glowSize - glowOffset;
3342++
3343++ /* 2x2 Matrix here, adjust both x and y scale factors
3344++ * and the x and y position
3345++ *
3346++ * Scaling the x part of the texture in a positive direction
3347++ * and the y part in a negative direction here
3348++ * (left to right bottom to top)
3349++ *
3350++ * The base position (x0 and y0) here requires us to move backwards
3351++ * on the x dimention and forwards on y by the calculated rect dimentions
3352++ * multiplied by the scale factors (since we are moving forward on x we
3353++ * need the inverse of that which is 1 - y1 * yy
3354++ */
3355++
3356++ quadMatrix->xx = 1.0f / glowSize;
3357++ quadMatrix->yy = -1.0f / glowSize;
3358++ quadMatrix->x0 = -(x1 * quadMatrix->xx);
3359++ quadMatrix->y0 = 1.0f - (y1 * quadMatrix->yy);
3360++
3361++ y1 = MAX (WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) - glowOffset,
3362++ WIN_REAL_Y (w) + (WIN_REAL_HEIGHT (w) / 2));
3363++ x2 = MIN (WIN_REAL_X (w) + glowOffset,
3364++ WIN_REAL_X (w) + (WIN_REAL_WIDTH (w) / 2));
3365++
3366++ *box = CompRect (x1, y1, x2 - x1, y2 - y1);
3367++
3368++ /* Bottom right corner */
3369++ box = &mGlowQuads[GLOWQUAD_BOTTOMRIGHT].mBox;
3370++ mGlowQuads[GLOWQUAD_BOTTOMRIGHT].mMatrix = *matrix;
3371++ quadMatrix = &mGlowQuads[GLOWQUAD_BOTTOMRIGHT].mMatrix;
3372++
3373++ x1 = WIN_REAL_X (w) + WIN_REAL_WIDTH (w) - glowOffset;
3374++ y1 = WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) - glowOffset;
3375++ x2 = WIN_REAL_X (w) + WIN_REAL_WIDTH (w) + glowSize - glowOffset;
3376++ y2 = WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) + glowSize - glowOffset;
3377++
3378++ /* 2x2 Matrix here, adjust both x and y scale factors
3379++ * and the x and y position
3380++ *
3381++ * Scaling the both parts of the texture in a negative direction
3382++ * (right to left bottom to top)
3383++ *
3384++ * The base position (x0 and y0) here requires us to move forwards
3385++ * on both dimentions by the calculated rect dimentions
3386++ * multiplied by the scale factors
3387++ */
3388++
3389++ quadMatrix->xx = -1.0f / glowSize;
3390++ quadMatrix->yy = -1.0f / glowSize;
3391++ quadMatrix->x0 = 1.0 - (x1 * quadMatrix->xx);
3392++ quadMatrix->y0 = 1.0 - (y1 * quadMatrix->yy);
3393++
3394++ x1 = MAX (WIN_REAL_X (w) + WIN_REAL_WIDTH (w) - glowOffset,
3395++ WIN_REAL_X (w) + (WIN_REAL_WIDTH (w) / 2));
3396++ y1 = MAX (WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) - glowOffset,
3397++ WIN_REAL_Y (w) + (WIN_REAL_HEIGHT (w) / 2));
3398++
3399++ *box = CompRect (x1, y1, x2 - x1, y2 - y1);
3400++
3401++ /* Top edge */
3402++ box = &mGlowQuads[GLOWQUAD_TOP].mBox;
3403++ mGlowQuads[GLOWQUAD_TOP].mMatrix = *matrix;
3404++ quadMatrix = &mGlowQuads[GLOWQUAD_TOP].mMatrix;
3405++
3406++ x1 = WIN_REAL_X (w) + glowOffset;
3407++ y1 = WIN_REAL_Y (w) - glowSize + glowOffset;
3408++ x2 = WIN_REAL_X (w) + WIN_REAL_WIDTH (w) - glowOffset;
3409++ y2 = WIN_REAL_Y (w) + glowOffset;
3410++
3411++ /* 2x2 Matrix here, adjust both x and y scale factors
3412++ * and the x and y position
3413++ *
3414++ * No need to scale the x part of the texture here, but we
3415++ * are scaling on the y part in a positive direciton
3416++ *
3417++ * The base position (y0) here requires us to move backwards
3418++ * on the x dimention and forwards on y by the calculated rect dimentions
3419++ * multiplied by the scale factors
3420++ */
3421++
3422++ quadMatrix->xx = 0.0f;
3423++ quadMatrix->yy = 1.0f / glowSize;
3424++ quadMatrix->x0 = 1.0;
3425++ quadMatrix->y0 = -(y1 * quadMatrix->yy);
3426++
3427++ *box = CompRect (x1, y1, x2 - x1, y2 - y1);
3428++
3429++ /* Bottom edge */
3430++ box = &mGlowQuads[GLOWQUAD_BOTTOM].mBox;
3431++ mGlowQuads[GLOWQUAD_BOTTOM].mMatrix = *matrix;
3432++ quadMatrix = &mGlowQuads[GLOWQUAD_BOTTOM].mMatrix;
3433++
3434++ x1 = WIN_REAL_X (w) + glowOffset;
3435++ y1 = WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) - glowOffset;
3436++ x2 = WIN_REAL_X (w) + WIN_REAL_WIDTH (w) - glowOffset;
3437++ y2 = WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) + glowSize - glowOffset;
3438++
3439++ /* 2x2 Matrix here, adjust both x and y scale factors
3440++ * and the x and y position
3441++ *
3442++ * No need to scale the x part of the texture here, but we
3443++ * are scaling on the y part in a negative direciton
3444++ *
3445++ * The base position (y0) here requires us to move forwards
3446++ * on y by the calculated rect dimentions
3447++ * multiplied by the scale factors
3448++ */
3449++
3450++ quadMatrix->xx = 0.0f;
3451++ quadMatrix->yy = -1.0f / glowSize;
3452++ quadMatrix->x0 = 1.0;
3453++ quadMatrix->y0 = 1.0 - (y1 * quadMatrix->yy);
3454++
3455++ *box = CompRect (x1, y1, x2 - x1, y2 - y1);
3456++
3457++ /* Left edge */
3458++ box = &mGlowQuads[GLOWQUAD_LEFT].mBox;
3459++ mGlowQuads[GLOWQUAD_LEFT].mMatrix = *matrix;
3460++ quadMatrix = &mGlowQuads[GLOWQUAD_LEFT].mMatrix;
3461++
3462++ x1 = WIN_REAL_X (w) - glowSize + glowOffset;
3463++ y1 = WIN_REAL_Y (w) + glowOffset;
3464++ x2 = WIN_REAL_X (w) + glowOffset;
3465++ y2 = WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) - glowOffset;
3466++
3467++ /* 2x2 Matrix here, adjust both x and y scale factors
3468++ * and the x and y position
3469++ *
3470++ * No need to scale the y part of the texture here, but we
3471++ * are scaling on the x part in a positive direciton
3472++ *
3473++ * The base position (x0) here requires us to move backwards
3474++ * on x by the calculated rect dimentions
3475++ * multiplied by the scale factors
3476++ */
3477++
3478++ quadMatrix->xx = 1.0f / glowSize;
3479++ quadMatrix->yy = 0.0f;
3480++ quadMatrix->x0 = -(x1 * quadMatrix->xx);
3481++ quadMatrix->y0 = 1.0;
3482++
3483++ *box = CompRect (x1, y1, x2 - x1, y2 - y1);
3484++
3485++ /* Right edge */
3486++ box = &mGlowQuads[GLOWQUAD_RIGHT].mBox;
3487++ mGlowQuads[GLOWQUAD_RIGHT].mMatrix = *matrix;
3488++ quadMatrix = &mGlowQuads[GLOWQUAD_RIGHT].mMatrix;
3489++
3490++ x1 = WIN_REAL_X (w) + WIN_REAL_WIDTH (w) - glowOffset;
3491++ y1 = WIN_REAL_Y (w) + glowOffset;
3492++ x2 = WIN_REAL_X (w) + WIN_REAL_WIDTH (w) + glowSize - glowOffset;
3493++ y2 = WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) - glowOffset;
3494++
3495++ /* 2x2 Matrix here, adjust both x and y scale factors
3496++ * and the x and y position
3497++ *
3498++ * No need to scale the y part of the texture here, but we
3499++ * are scaling on the x part in a negative direciton
3500++ *
3501++ * The base position (x0) here requires us to move forwards
3502++ * on x by the calculated rect dimentions
3503++ * multiplied by the scale factors
3504++ */
3505++
3506++ quadMatrix->xx = -1.0f / glowSize;
3507++ quadMatrix->yy = 0.0f;
3508++ quadMatrix->x0 = 1.0 - (x1 * quadMatrix->xx);
3509++ quadMatrix->y0 = 1.0;
3510++
3511++ *box = CompRect (x1, y1, x2 - x1, y2 - y1);
3512++}
3513+Index: ubuntu/plugins/expo/src/glow.h
3514+===================================================================
3515+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
3516++++ ubuntu/plugins/expo/src/glow.h 2012-09-08 11:51:33.107328243 +0800
3517+@@ -0,0 +1,66 @@
3518++/**
3519++ *
3520++ * Compiz group plugin
3521++ *
3522++ * glow.h
3523++ *
3524++ * Copyright : (C) 2006-2010 by Patrick Niklaus, Roi Cohen,
3525++ * Danny Baumann, Sam Spilsbury
3526++ * Authors: Patrick Niklaus <patrick.niklaus@googlemail.com>
3527++ * Roi Cohen <roico.beryl@gmail.com>
3528++ * Danny Baumann <maniac@opencompositing.org>
3529++ * Sam Spilsbury <smspillaz@gmail.com>
3530++ *
3531++ *
3532++ * This program is free software; you can redistribute it and/or
3533++ * modify it under the terms of the GNU General Public License
3534++ * as published by the Free Software Foundation; either version 2
3535++ * of the License, or (at your option) any later version.
3536++ *
3537++ * This program is distributed in the hope that it will be useful,
3538++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3539++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3540++ * GNU General Public License for more details.
3541++ *
3542++ **/
3543++
3544++#ifndef _EXPO_GLOW_H
3545++#define _EXPO_GLOW_H
3546++
3547++#define GLOWQUAD_TOPLEFT 0
3548++#define GLOWQUAD_TOPRIGHT 1
3549++#define GLOWQUAD_BOTTOMLEFT 2
3550++#define GLOWQUAD_BOTTOMRIGHT 3
3551++#define GLOWQUAD_TOP 4
3552++#define GLOWQUAD_BOTTOM 5
3553++#define GLOWQUAD_LEFT 6
3554++#define GLOWQUAD_RIGHT 7
3555++#define NUM_GLOWQUADS 8
3556++
3557++/* Represents a particular glow texture, so here
3558++ * we have hardcoded in the texture data, the offset
3559++ * and the size of the texture
3560++ */
3561++
3562++typedef struct _GlowTextureProperties {
3563++ char *textureData;
3564++ int textureSize;
3565++ int glowOffset;
3566++} GlowTextureProperties;
3567++
3568++/* Each glow quad contains a 2x2 scale + positional matrix
3569++ * (the 3rd column is not used since that is for matrix skew
3570++ * operations which we do not care about)
3571++ * and also a CompRect which describes the size and position of
3572++ * the quad on the glow
3573++ */
3574++
3575++class GlowQuad {
3576++ public:
3577++ CompRect mBox;
3578++ GLTexture::Matrix mMatrix;
3579++};
3580++
3581++extern const GlowTextureProperties glowTextureProperties;
3582++
3583++#endif
3584+Index: ubuntu/plugins/expo/src/group_glow.h
3585+===================================================================
3586+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
3587++++ ubuntu/plugins/expo/src/group_glow.h 2012-09-08 11:51:33.107328243 +0800
3588+@@ -0,0 +1,197 @@
3589++#ifndef _GROUP_GLOWTEX_H
3590++#define _GROUP_GLOWTEX_H
3591++
3592++/**
3593++ *
3594++ * Compiz group plugin
3595++ *
3596++ * group_glow.h
3597++ *
3598++ * Copyright : (C) 2006-2010 by Patrick Niklaus, Roi Cohen,
3599++ * Danny Baumann, Sam Spilsbury
3600++ * Authors: Patrick Niklaus <patrick.niklaus@googlemail.com>
3601++ * Roi Cohen <roico.beryl@gmail.com>
3602++ * Danny Baumann <maniac@opencompositing.org>
3603++ * Sam Spilsbury <smspillaz@gmail.com>
3604++ *
3605++ *
3606++ * This program is free software; you can redistribute it and/or
3607++ * modify it under the terms of the GNU General Public License
3608++ * as published by the Free Software Foundation; either version 2
3609++ * of the License, or (at your option) any later version.
3610++ *
3611++ * This program is distributed in the hope that it will be useful,
3612++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3613++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3614++ * GNU General Public License for more details.
3615++ *
3616++ **/
3617++
3618++/*
3619++ * glowTex
3620++ */
3621++
3622++static char glowTexRect[4097] = {
3623++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3624++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3625++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\6\377"
3626++ "\377\377\6\377\377\377\6\377\377\377\6\377\377\377\6\377\377\377\6\377\377"
3627++ "\377\6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3628++ "\0\0\0\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\6\377\377\377\6\377\377"
3629++ "\377\6\377\377\377\6\377\377\377\6\377\377\377\6\377\377\377\6\377\377\377"
3630++ "\6\377\377\377\6\377\377\377\6\377\377\377\6\377\377\377\6\377\377\377\6"
3631++ "\377\377\377\14\377\377\377\14\377\377\377\14\377\377\377\14\377\377\377"
3632++ "\14\377\377\377\14\377\377\377\14\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3633++ "\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\6\377\377\377\6\377\377\377\14"
3634++ "\377\377\377\14\377\377\377\22\377\377\377\22\377\377\377\22\377\377\377"
3635++ "\27\377\377\377\27\377\377\377\27\377\377\377\27\377\377\377\27\377\377\377"
3636++ "\27\377\377\377\27\377\377\377\27\377\377\377\27\377\377\377\27\377\377\377"
3637++ "\35\377\377\377\35\377\377\377\35\377\377\377\35\377\377\377\35\377\377\377"
3638++ "\35\377\377\377\35\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377"
3639++ "\377\6\377\377\377\6\377\377\377\14\377\377\377\22\377\377\377\27\377\377"
3640++ "\377\27\377\377\377\35\377\377\377#\377\377\377'\377\377\377'\377\377\377"
3641++ "+\377\377\377+\377\377\377+\377\377\377+\377\377\377+\377\377\377+\377\377"
3642++ "\377+\377\377\377+\377\377\377+\377\377\3771\377\377\3771\377\377\3771\377"
3643++ "\377\3771\377\377\3771\377\377\3771\377\377\3771\0\0\0\0\0\0\0\0\0\0\0\0"
3644++ "\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\14\377\377\377\22\377\377\377"
3645++ "\27\377\377\377\35\377\377\377#\377\377\377+\377\377\3771\377\377\3776\377"
3646++ "\377\377<\377\377\377>\377\377\377C\377\377\377I\377\377\377I\377\377\377"
3647++ "I\377\377\377I\377\377\377I\377\377\377I\377\377\377I\377\377\377I\377\377"
3648++ "\377L\377\377\377L\377\377\377L\377\377\377L\377\377\377L\377\377\377L\377"
3649++ "\377\377L\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\14\377"
3650++ "\377\377\22\377\377\377\27\377\377\377#\377\377\377+\377\377\3776\377\377"
3651++ "\377C\377\377\377L\377\377\377U\377\377\377]\377\377\377`\377\377\377d\377"
3652++ "\377\377h\377\377\377k\377\377\377k\377\377\377k\377\377\377k\377\377\377"
3653++ "k\377\377\377k\377\377\377k\377\377\377p\377\377\377p\377\377\377p\377\377"
3654++ "\377p\377\377\377p\377\377\377p\377\377\377p\0\0\0\0\0\0\0\0\0\0\0\0\377"
3655++ "\377\377\6\377\377\377\14\377\377\377\22\314\314\314\35\377\377\377'\377"
3656++ "\377\3771\377\377\377>\357\357\357P\377\377\377]\363\363\363k\365\365\365"
3657++ "v\365\365\365|\377\377\377\202\367\367\367\210\367\367\367\214\367\367\367"
3658++ "\216\367\367\367\221\367\367\367\221\367\367\367\221\367\367\367\221\367"
3659++ "\367\367\221\367\367\367\221\367\367\367\224\367\367\367\224\367\367\367"
3660++ "\224\367\367\367\224\367\367\367\224\367\367\367\224\367\367\367\224\0\0"
3661++ "\0\0\0\0\0\0\377\377\377\6\377\377\377\6\377\377\377\22\377\377\377\27\377"
3662++ "\377\377'\377\377\3776\377\377\377I\377\377\377Y\377\377\377k\376\376\376"
3663++ "y\377\377\377\210\377\377\377\224\377\377\377\235\377\377\377\245\377\377"
3664++ "\377\253\377\377\377\255\377\377\377\262\377\377\377\262\377\377\377\263"
3665++ "\377\377\377\263\377\377\377\263\377\377\377\263\377\377\377\263\377\377"
3666++ "\377\266\377\377\377\266\377\377\377\266\377\377\377\266\377\377\377\266"
3667++ "\377\377\377\266\377\377\377\266\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377"
3668++ "\14\377\377\377\27\377\377\377#\377\377\3771\377\377\377I\377\377\377]\377"
3669++ "\377\377r\377\377\377\205\377\377\377\231\377\377\377\247\377\377\377\263"
3670++ "\377\377\377\275\377\377\377\304\377\377\377\310\377\377\377\313\377\377"
3671++ "\377\316\377\377\377\320\377\377\377\320\377\377\377\320\377\377\377\320"
3672++ "\377\377\377\320\377\377\377\320\377\377\377\322\377\377\377\322\377\377"
3673++ "\377\322\377\377\377\322\377\377\377\322\377\377\377\322\377\377\377\322"
3674++ "\0\0\0\0\377\377\377\6\377\377\377\6\377\377\377\22\377\377\377\35\377\377"
3675++ "\377+\377\377\377>\377\377\377Y\377\377\377r\377\377\377\210\376\376\376"
3676++ "\237\377\377\377\262\377\377\377\302\377\377\377\313\377\377\377\324\377"
3677++ "\377\377\332\376\376\376\336\377\377\377\341\377\377\377\342\377\377\377"
3678++ "\344\377\377\377\344\377\377\377\344\377\377\377\344\377\377\377\344\377"
3679++ "\377\377\344\377\377\377\345\377\377\377\345\377\377\377\345\377\377\377"
3680++ "\345\377\377\377\345\377\377\377\345\377\377\377\345\0\0\0\0\377\377\377"
3681++ "\6\377\377\377\14\377\377\377\27\377\377\377#\377\377\3776\377\377\377P\377"
3682++ "\377\377k\377\377\377\205\376\376\376\237\372\372\372\266\377\377\377\307"
3683++ "\373\373\373\325\373\373\373\337\374\374\374\345\374\374\374\352\374\374"
3684++ "\374\355\374\374\374\357\374\374\374\360\374\374\374\361\374\374\374\361"
3685++ "\374\374\374\362\374\374\374\362\374\374\374\362\374\374\374\362\374\374"
3686++ "\374\362\374\374\374\362\374\374\374\362\374\374\374\362\374\374\374\362"
3687++ "\374\374\374\362\374\374\374\362\0\0\0\0\377\377\377\6\377\377\377\14\377"
3688++ "\377\377\35\377\377\377+\377\377\377C\377\377\377]\377\377\377|\377\377\377"
3689++ "\231\377\377\377\263\377\377\377\307\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3690++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3691++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377"
3692++ "\377\377\6\377\377\377\22\324\324\324#\377\377\3771\377\377\377L\363\363"
3693++ "\363k\377\377\377\210\377\377\377\247\377\377\377\302\377\377\377\325\0\0"
3694++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3695++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3696++ "\0\0\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\14\377\377\377\22\377\377"
3697++ "\377#\377\377\377<\377\377\377U\377\377\377v\377\377\377\226\377\377\377"
3698++ "\263\377\377\377\315\377\377\377\337\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3699++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3700++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377"
3701++ "\6\377\377\377\14\377\377\377\27\377\377\377'\377\377\377>\377\377\377]\377"
3702++ "\377\377|\370\370\370\237\377\377\377\275\373\373\373\325\377\377\377\345"
3703++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3704++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3705++ "\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\14\377\377\377\27\377"
3706++ "\377\377+\377\377\377C\377\377\377`\377\377\377\202\377\377\377\247\377\377"
3707++ "\377\304\377\377\377\332\377\377\377\352\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3708++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3709++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377"
3710++ "\377\6\377\377\377\14\377\377\377\27\377\377\377+\377\377\377C\377\377\377"
3711++ "d\377\377\377\210\377\377\377\253\377\377\377\310\376\376\376\336\374\374"
3712++ "\374\355\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3713++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3714++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\14\377\377\377"
3715++ "\35\377\377\377+\377\377\377I\377\377\377h\377\377\377\214\377\377\377\260"
3716++ "\377\377\377\313\374\374\374\342\374\374\374\357\0\0\0\0\0\0\0\0\0\0\0\0"
3717++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3718++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3719++ "\377\377\377\6\377\377\377\14\377\377\377\35\342\342\3421\377\377\377I\377"
3720++ "\377\377k\377\377\377\216\377\377\377\262\377\377\377\316\374\374\374\344"
3721++ "\377\377\377\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3722++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3723++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\14\377"
3724++ "\377\377\35\377\377\3771\377\377\377L\377\377\377k\377\377\377\221\377\377"
3725++ "\377\263\377\377\377\320\377\377\377\344\377\377\377\361\0\0\0\0\0\0\0\0"
3726++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3727++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3728++ "\0\0\0\0\377\377\377\6\377\377\377\14\377\377\377\35\377\377\3771\377\377"
3729++ "\377L\377\377\377k\377\377\377\221\377\377\377\263\377\377\377\320\377\377"
3730++ "\377\344\374\374\374\362\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3731++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3732++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377"
3733++ "\14\377\377\377\35\377\377\3771\377\377\377L\364\364\364p\377\377\377\221"
3734++ "\372\372\372\266\377\377\377\320\374\374\374\345\377\377\377\362\0\0\0\0"
3735++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3736++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3737++ "\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\14\377\377\377\35\377\377\377"
3738++ "1\377\377\377L\377\377\377p\377\377\377\221\377\377\377\266\373\373\373\322"
3739++ "\377\377\377\345\377\377\377\362\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3740++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3741++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\6\377"
3742++ "\377\377\14\377\377\377\35\377\377\3771\377\377\377L\377\377\377p\377\377"
3743++ "\377\221\377\377\377\266\373\373\373\322\377\377\377\345\377\377\377\362"
3744++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3745++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3746++ "\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\14\377\377\377\35\377"
3747++ "\377\3771\377\377\377L\377\377\377p\377\377\377\221\377\377\377\266\373\373"
3748++ "\373\322\377\377\377\345\377\377\377\362\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3749++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3750++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377"
3751++ "\377\6\377\377\377\14\377\377\377\35\377\377\3771\377\377\377L\377\377\377"
3752++ "p\367\367\367\224\377\377\377\266\377\377\377\322\377\377\377\345\374\374"
3753++ "\374\362\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3754++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3755++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\14\377\377\377"
3756++ "\35\377\377\3771\377\377\377L\377\377\377p\367\367\367\224\377\377\377\266"
3757++ "\377\377\377\322\377\377\377\345\374\374\374\362\0\0\0\0\0\0\0\0\0\0\0\0"
3758++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3759++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3760++ "\377\377\377\6\377\377\377\14\377\377\377\35\377\377\3771\377\377\377L\377"
3761++ "\377\377p\367\367\367\224\377\377\377\266\377\377\377\322\377\377\377\345"
3762++ "\374\374\374\362\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3763++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3764++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\14\377"
3765++ "\377\377\35\377\377\3771\377\377\377L\377\377\377p\367\367\367\224\377\377"
3766++ "\377\266\377\377\377\322\377\377\377\345\374\374\374\362\0\0\0\0\0\0\0\0"
3767++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3768++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3769++ "\0\0\0\0\377\377\377\6\377\377\377\14\377\377\377\35\377\377\3771\377\377"
3770++ "\377L\377\377\377p\367\367\367\224\377\377\377\266\377\377\377\322\377\377"
3771++ "\377\345\374\374\374\362\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3772++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3773++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377"
3774++ "\14\377\377\377\35\377\377\3771\377\377\377L\377\377\377p\367\367\367\224"
3775++ "\377\377\377\266\377\377\377\322\377\377\377\345\374\374\374\362\0\0\0\0"
3776++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3777++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3778++ "\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\14\377\377\377\35\377\377\377"
3779++ "1\377\377\377L\377\377\377p\367\367\367\224\377\377\377\266\377\377\377\322"
3780++ "\377\377\377\345\374\374\374\362\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3781++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
3782++ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
3783++};
3784++
3785++#endif
3786+Index: ubuntu/plugins/expo/src/wall_offset/CMakeLists.txt
3787+===================================================================
3788+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
3789++++ ubuntu/plugins/expo/src/wall_offset/CMakeLists.txt 2012-09-08 14:56:23.698323512 +0800
3790+@@ -0,0 +1,33 @@
3791++include_directories (
3792++ ${CMAKE_CURRENT_SOURCE_DIR}/include
3793++ ${CMAKE_CURRENT_SOURCE_DIR}/src
3794++ ${Boost_INCLUDE_DIRS}
3795++ ${GLIBMM_INCLUDE_DIRS}
3796++)
3797++
3798++link_directories (${GLIBMM_LIBRARY_DIRS} ${COMPIZ_LIBRARY_DIRS})
3799++
3800++set (
3801++ PRIVATE_HEADERS
3802++ ${CMAKE_CURRENT_SOURCE_DIR}/include/wall-offset.h
3803++)
3804++
3805++set (
3806++ SRCS
3807++ ${CMAKE_CURRENT_SOURCE_DIR}/src/wall-offset.cpp
3808++)
3809++
3810++add_library (
3811++ compiz_expo_wall_offset STATIC
3812++ ${SRCS}
3813++ ${PRIVATE_HEADERS}
3814++)
3815++
3816++if (COMPIZ_BUILD_TESTING)
3817++ add_subdirectory ( ${CMAKE_CURRENT_SOURCE_DIR}/tests )
3818++endif (COMPIZ_BUILD_TESTING)
3819++
3820++target_link_libraries (
3821++ compiz_expo_wall_offset
3822++ compiz_core
3823++)
3824+Index: ubuntu/plugins/expo/src/wall_offset/include/wall-offset.h
3825+===================================================================
3826+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
3827++++ ubuntu/plugins/expo/src/wall_offset/include/wall-offset.h 2012-09-08 11:51:33.107328243 +0800
3828+@@ -0,0 +1,43 @@
3829++/**
3830++ * Copyright © 2012 Canonical Ltd.
3831++ *
3832++ * Authors:
3833++ * Sam Spilsbury <sam.spilsbury@canonical.com>
3834++ *
3835++ * This program is free software; you can redistribute it and/or
3836++ * modify it under the terms of the GNU General Public License
3837++ * as published by the Free Software Foundation; either version 2
3838++ * of the License, or (at your option) any later version.
3839++ *
3840++ * This program is distributed in the hope that it will be useful,
3841++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3842++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3843++ * GNU General Public License for more details.
3844++ *
3845++ **/
3846++
3847++#ifndef _COMPIZ_EXPO_WALL_OFFSET_H
3848++#define _COMPIZ_EXPO_WALL_OFFSET_H
3849++
3850++#include <core/point.h>
3851++#include <core/size.h>
3852++#include <core/rect.h>
3853++
3854++namespace compiz
3855++{
3856++ namespace expo
3857++ {
3858++ void
3859++ calculateWallOffset (const CompRect &output,
3860++ const CompPoint &offsetInScreenCoords,
3861++ const CompPoint &vpSize,
3862++ const CompSize &screenSize,
3863++ float &offsetInWorldX,
3864++ float &offsetInWorldY,
3865++ float &worldScaleFactorX,
3866++ float &worldScaleFactorY,
3867++ float animationProgress);
3868++ }
3869++}
3870++
3871++#endif
3872+Index: ubuntu/plugins/expo/src/wall_offset/src/wall-offset.cpp
3873+===================================================================
3874+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
3875++++ ubuntu/plugins/expo/src/wall_offset/src/wall-offset.cpp 2012-09-08 16:54:24.033432999 +0800
3876+@@ -0,0 +1,55 @@
3877++/**
3878++ * Copyright © 2012 Canonical Ltd.
3879++ *
3880++ * Authors:
3881++ * Sam Spilsbury <sam.spilsbury@canonical.com>
3882++ *
3883++ * This program is free software; you can redistribute it and/or
3884++ * modify it under the terms of the GNU General Public License
3885++ * as published by the Free Software Foundation; either version 2
3886++ * of the License, or (at your option) any later version.
3887++ *
3888++ * This program is distributed in the hope that it will be useful,
3889++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3890++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3891++ * GNU General Public License for more details.
3892++ *
3893++ **/
3894++#include "wall-offset.h"
3895++
3896++namespace compiz
3897++{
3898++ namespace expo
3899++ {
3900++ void
3901++ calculateWallOffset (const CompRect &output,
3902++ const CompPoint &offsetInScreenCoords,
3903++ const CompPoint &vpSize,
3904++ const CompSize &screenSize,
3905++ float &offsetInWorldX,
3906++ float &offsetInWorldY,
3907++ float &worldScaleFactorX,
3908++ float &worldScaleFactorY,
3909++ float animationProgress)
3910++ {
3911++ const float sx = screenSize.width () / static_cast <float> (output.width ());
3912++ const float sy = screenSize.height () / static_cast <float> (output.height ());
3913++ offsetInWorldX = 0.0;
3914++ offsetInWorldY = 0.0;
3915++ worldScaleFactorX = 1.0f;
3916++ worldScaleFactorY = 1.0f;
3917++
3918++ if (output.left () == 0)
3919++ {
3920++ offsetInWorldX = ((vpSize.x () * sx) / ((float) output.width ()) * (offsetInScreenCoords.x ()) * animationProgress);
3921++ worldScaleFactorX = 1.0f - ((float) (offsetInScreenCoords.x ()) / (float) (output.width ())) * animationProgress;
3922++ }
3923++
3924++ if (output.top () == 0)
3925++ {
3926++ offsetInWorldY = ((vpSize.y () * sy) / ((float) output.height ()) * (offsetInScreenCoords.y ()) * animationProgress);
3927++ worldScaleFactorY = 1.0f - ((float) (offsetInScreenCoords.y ()) / (float) output.height ()) * animationProgress;
3928++ }
3929++ }
3930++ }
3931++}
3932+Index: ubuntu/plugins/expo/src/wall_offset/tests/CMakeLists.txt
3933+===================================================================
3934+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
3935++++ ubuntu/plugins/expo/src/wall_offset/tests/CMakeLists.txt 2012-09-08 11:51:33.107328243 +0800
3936+@@ -0,0 +1,19 @@
3937++if (NOT GTEST_FOUND)
3938++ message ("Google Test not found - cannot build tests!")
3939++ set (COMPIZ_BUILD_TESTING OFF)
3940++endif (NOT GTEST_FOUND)
3941++
3942++include_directories (${GTEST_INCLUDE_DIRS})
3943++
3944++link_directories (${COMPIZ_LIBRARY_DIRS})
3945++
3946++add_executable (compiz_test_expo_wall_offset
3947++ ${CMAKE_CURRENT_SOURCE_DIR}/test-expo-wall-offset.cpp)
3948++
3949++target_link_libraries (compiz_test_expo_wall_offset
3950++ compiz_expo_wall_offset
3951++ ${GTEST_BOTH_LIBRARIES}
3952++ ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
3953++ )
3954++
3955++compiz_discover_tests (compiz_test_expo_wall_offset COVERAGE compiz_expo_wall_offset)
3956+Index: ubuntu/plugins/expo/src/wall_offset/tests/test-expo-wall-offset.cpp
3957+===================================================================
3958+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
3959++++ ubuntu/plugins/expo/src/wall_offset/tests/test-expo-wall-offset.cpp 2012-09-08 17:25:18.714629857 +0800
3960+@@ -0,0 +1,263 @@
3961++/*
3962++ * Copyright © 2012 Canonical Ltd.
3963++ *
3964++ * Permission to use, copy, modify, distribute, and sell this software
3965++ * and its documentation for any purpose is hereby granted without
3966++ * fee, provided that the above copyright notice appear in all copies
3967++ * and that both that copyright notice and this permission notice
3968++ * appear in supporting documentation, and that the name of
3969++ * Canonical Ltd. not be used in advertising or publicity pertaining to
3970++ * distribution of the software without specific, written prior permission.
3971++ * Canonical Ltd. makes no representations about the suitability of this
3972++ * software for any purpose. It is provided "as is" without express or
3973++ * implied warranty.
3974++ *
3975++ * CANONICAL, LTD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
3976++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
3977++ * NO EVENT SHALL CANONICAL, LTD. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
3978++ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
3979++ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
3980++ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
3981++ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
3982++ *
3983++ * Authored by: Sam Spilsbury <sam.spilsbury@canonical.com>
3984++ */
3985++#include <tr1/tuple>
3986++#include <gtest/gtest.h>
3987++#include "wall-offset.h"
3988++
3989++using ::testing::WithParamInterface;
3990++using ::testing::ValuesIn;
3991++using ::testing::Combine;
3992++using ::testing::Range;
3993++
3994++class ExpoWallOffsetTest :
3995++ public ::testing::Test
3996++{
3997++ protected:
3998++
3999++ float offsetInWorldX;
4000++ float offsetInWorldY;
4001++ float worldScaleFactorX;
4002++ float worldScaleFactorY;
4003++};
4004++
4005++namespace
4006++{
4007++ const unsigned int nAnimationsBegin = 0;
4008++ const unsigned int nAnimationSteps = 20;
4009++
4010++ struct OffsetAnimationParameters
4011++ {
4012++ float offsetInWorldX;
4013++ float offsetInWorldY;
4014++ float worldScaleFactorX;
4015++ float worldScaleFactorY;
4016++ };
4017++
4018++ struct OffsetParameters
4019++ {
4020++ float offsetX;
4021++ float offsetY;
4022++ int vpSizeWidth;
4023++ int vpSizeHeight;
4024++ int screenWidth;
4025++ int screenHeight;
4026++ int outputWidth;
4027++ int outputHeight;
4028++ OffsetAnimationParameters animationParameters[20];
4029++ };
4030++
4031++ const OffsetParameters testingOffsetParameters[] =
4032++ {
4033++ {
4034++ 0,
4035++ 0,
4036++ 1,
4037++ 1,
4038++ 100,
4039++ 100,
4040++ 100,
4041++ 100,
4042++ {
4043++ { 0, 0, 1.0, 1.0 },
4044++ { 0, 0, 1.0, 1.0 },
4045++ { 0, 0, 1.0, 1.0 },
4046++ { 0, 0, 1.0, 1.0 },
4047++ { 0, 0, 1.0, 1.0 },
4048++ { 0, 0, 1.0, 1.0 },
4049++ { 0, 0, 1.0, 1.0 },
4050++ { 0, 0, 1.0, 1.0 },
4051++ { 0, 0, 1.0, 1.0 },
4052++ { 0, 0, 1.0, 1.0 },
4053++ { 0, 0, 1.0, 1.0 },
4054++ { 0, 0, 1.0, 1.0 },
4055++ { 0, 0, 1.0, 1.0 },
4056++ { 0, 0, 1.0, 1.0 },
4057++ { 0, 0, 1.0, 1.0 },
4058++ { 0, 0, 1.0, 1.0 },
4059++ { 0, 0, 1.0, 1.0 },
4060++ { 0, 0, 1.0, 1.0 },
4061++ { 0, 0, 1.0, 1.0 },
4062++ { 0, 0, 1.0, 1.0 }
4063++ }
4064++ },
4065++ /* Monitor 1280x800, Screen: 1280x800, Viewport Layout: 2x2, Offset: 32, 24 */
4066++ {
4067++ 32,
4068++ 24,
4069++ 2,
4070++ 2,
4071++ 1280,
4072++ 800,
4073++ 1280,
4074++ 800,
4075++ {
4076++ { 0, 0, 1, 1 },
4077++ { 0.0025000001769512892, 0.0011718750465661287, 0.99874997138977051, 0.99906247854232788 },
4078++ { 0.0050000003539025784, 0.0023437500931322575, 0.99750000238418579, 0.99812501668930054 },
4079++ { 0.0075000002980232239, 0.0035156251396983862, 0.9962499737739563, 0.99718749523162842 },
4080++ { 0.010000000707805157, 0.0046875001862645149, 0.99500000476837158, 0.9962499737739563 },
4081++ { 0.012500000186264515, 0.005859375, 0.99374997615814209, 0.99531251192092896 },
4082++ { 0.015000000596046448, 0.0070312502793967724, 0.99250000715255737, 0.99437499046325684 },
4083++ { 0.017500000074505806, 0.0082031246274709702, 0.99124997854232788, 0.99343752861022949 },
4084++ { 0.020000001415610313, 0.0093750003725290298, 0.99000000953674316, 0.99250000715255737 },
4085++ { 0.022499999031424522, 0.01054687425494194, 0.98874998092651367, 0.99156248569488525 },
4086++ { 0.02500000037252903, 0.01171875, 0.98750001192092896, 0.99062502384185791 },
4087++ { 0.027500001713633537, 0.01289062574505806, 0.98624998331069946, 0.98968750238418579 },
4088++ { 0.030000001192092896, 0.014062500558793545, 0.98500001430511475, 0.98874998092651367 },
4089++ { 0.032499998807907104, 0.015234374441206455, 0.98374998569488525, 0.98781251907348633 },
4090++ { 0.035000000149011612, 0.01640624925494194, 0.98250001668930054, 0.98687499761581421 },
4091++ { 0.037500001490116119, 0.017578125, 0.98124998807907104, 0.98593747615814209 },
4092++ { 0.040000002831220627, 0.01875000074505806, 0.98000001907348633, 0.98500001430511475 },
4093++ { 0.042500000447034836, 0.019921876490116119, 0.97874999046325684, 0.98406249284744263 },
4094++ { 0.044999998062849045, 0.021093748509883881, 0.97750002145767212, 0.98312497138977051 },
4095++ { 0.047499999403953552, 0.02226562425494194, 0.97624999284744263, 0.98218750953674316 }
4096++ }
4097++ },
4098++ /* Monitor 1280x1024, Screen: 2560x1024, Viewport Layout: 2x2, Offset: 32, 24 */
4099++ {
4100++ 32,
4101++ 24,
4102++ 2,
4103++ 2,
4104++ 2560,
4105++ 1024,
4106++ 1280,
4107++ 1024,
4108++ {
4109++ { 0, 0, 1, 1 },
4110++ { 0.0050000003539025784, 0.001500000013038516, 0.99874997138977051, 0.99906247854232788 },
4111++ { 0.010000000707805157, 0.0030000000260770321, 0.99750000238418579, 0.99812501668930054 },
4112++ { 0.015000000596046448, 0.0045000002719461918, 0.9962499737739563, 0.99718749523162842 },
4113++ { 0.020000001415610313, 0.0060000000521540642, 0.99500000476837158, 0.9962499737739563 },
4114++ { 0.02500000037252903, 0.0074999998323619366, 0.99374997615814209, 0.99531251192092896 },
4115++ { 0.030000001192092896, 0.0090000005438923836, 0.99250000715255737, 0.99437499046325684 },
4116++ { 0.035000000149011612, 0.010499999858438969, 0.99124997854232788, 0.99343752861022949 },
4117++ { 0.040000002831220627, 0.012000000104308128, 0.99000000953674316, 0.99250000715255737 },
4118++ { 0.044999998062849045, 0.013499999418854713, 0.98874998092651367, 0.99156248569488525 },
4119++ { 0.05000000074505806, 0.014999999664723873, 0.98750001192092896, 0.99062502384185791 },
4120++ { 0.055000003427267075, 0.016499999910593033, 0.98624998331069946, 0.98968750238418579 },
4121++ { 0.060000002384185791, 0.018000001087784767, 0.98500001430511475, 0.98874998092651367 },
4122++ { 0.064999997615814209, 0.019499998539686203, 0.98374998569488525, 0.98781251907348633 },
4123++ { 0.070000000298023224, 0.020999999716877937, 0.98250001668930054, 0.98687499761581421 },
4124++ { 0.075000002980232239, 0.022499999031424522, 0.98124998807907104, 0.98593747615814209 },
4125++ { 0.080000005662441254, 0.024000000208616257, 0.98000001907348633, 0.98500001430511475 },
4126++ { 0.085000000894069672, 0.025499999523162842, 0.97874999046325684, 0.98406249284744263 },
4127++ { 0.08999999612569809, 0.026999998837709427, 0.97750002145767212, 0.98312497138977051 },
4128++ { 0.094999998807907104, 0.028499998152256012, 0.97624999284744263, 0.98218750953674316 }
4129++ }
4130++ },
4131++ };
4132++
4133++ typedef std::tr1::tuple <OffsetParameters, unsigned int> AnimParam;
4134++}
4135++
4136++class ExpoWallOffsetTestAnimations :
4137++ public ExpoWallOffsetTest,
4138++ public ::testing::WithParamInterface <AnimParam>
4139++{
4140++ public:
4141++
4142++ void
4143++ RecordProperty (const char *name, float value)
4144++ {
4145++ ::testing::Message message;
4146++ message << value;
4147++ Test::RecordProperty (name, message.GetString ().c_str ());
4148++ }
4149++};
4150++
4151++TEST_P (ExpoWallOffsetTestAnimations, TestAnimationValues)
4152++{
4153++ const OffsetParameters &offset (std::tr1::get <0> (GetParam ()));
4154++ const unsigned int &index (std::tr1::get <1> (GetParam ()));
4155++
4156++ RecordProperty ("outputWidth", offset.outputWidth);
4157++ RecordProperty ("outputHeight", offset.outputHeight);
4158++ RecordProperty ("screenWidth", offset.screenWidth);
4159++ RecordProperty ("screenHeight", offset.screenHeight);
4160++ RecordProperty ("offsetX", offset.offsetX);
4161++ RecordProperty ("offsetY", offset.offsetY);
4162++
4163++ RecordProperty ("expected.offsetInWorldX", offset.animationParameters[index].offsetInWorldX);
4164++ RecordProperty ("expected.offsetInWorldY", offset.animationParameters[index].offsetInWorldY);
4165++ RecordProperty ("expected.worldScaleFactorX", offset.animationParameters[index].worldScaleFactorX);
4166++ RecordProperty ("expected.worldScaleFactorY", offset.animationParameters[index].worldScaleFactorY);
4167++
4168++ compiz::expo::calculateWallOffset (CompRect (0,
4169++ 0,
4170++ offset.outputWidth,
4171++ offset.outputWidth),
4172++ CompPoint (offset.offsetX,
4173++ offset.offsetY),
4174++ CompPoint (offset.vpSizeWidth,
4175++ offset.vpSizeHeight),
4176++ CompSize (offset.screenWidth,
4177++ offset.screenHeight),
4178++ offsetInWorldX,
4179++ offsetInWorldY,
4180++ worldScaleFactorX,
4181++ worldScaleFactorY,
4182++ index / static_cast <float> (nAnimationSteps));
4183++
4184++ RecordProperty ("offsetInWorldX", offsetInWorldX);
4185++ RecordProperty ("offsetInWorldY", offsetInWorldY);
4186++ RecordProperty ("worldScaleFactorX", worldScaleFactorX);
4187++ RecordProperty ("worldScaleFactorY", worldScaleFactorY);
4188++
4189++ EXPECT_EQ (offsetInWorldX, offset.animationParameters[index].offsetInWorldX);
4190++ EXPECT_EQ (offsetInWorldY, offset.animationParameters[index].offsetInWorldY);
4191++ EXPECT_EQ (worldScaleFactorX, offset.animationParameters[index].worldScaleFactorX);
4192++ EXPECT_EQ (worldScaleFactorY, offset.animationParameters[index].worldScaleFactorY);
4193++}
4194++
4195++TEST_F (ExpoWallOffsetTest, TestNoOffsetIfOutputIsNotOrigin)
4196++{
4197++ compiz::expo::calculateWallOffset (CompRect (1,
4198++ 1,
4199++ 100,
4200++ 100),
4201++ CompPoint (100,
4202++ 100),
4203++ CompPoint (1,
4204++ 1),
4205++ CompSize (100,
4206++ 100),
4207++ offsetInWorldX,
4208++ offsetInWorldY,
4209++ worldScaleFactorX,
4210++ worldScaleFactorY,
4211++ 1.0);
4212++
4213++ EXPECT_EQ (offsetInWorldX, 0.0f);
4214++ EXPECT_EQ (offsetInWorldY, 0.0f);
4215++ EXPECT_EQ (worldScaleFactorX, 1.0f);
4216++ EXPECT_EQ (worldScaleFactorY, 1.0f);
4217++}
4218++
4219++INSTANTIATE_TEST_CASE_P (ExpoAnimationOffsetTest,
4220++ ExpoWallOffsetTestAnimations,
4221++ Combine (ValuesIn (testingOffsetParameters),
4222++ Range (nAnimationsBegin,
4223++ nAnimationSteps)));
4224+Index: ubuntu/plugins/expo/CMakeLists.txt
4225+===================================================================
4226+--- ubuntu.orig/plugins/expo/CMakeLists.txt 2012-09-08 11:51:02.279175377 +0800
4227++++ ubuntu/plugins/expo/CMakeLists.txt 2012-09-08 11:51:33.107328243 +0800
4228+@@ -1,7 +1,16 @@
4229+ find_package (Compiz REQUIRED)
4230+ include (CompizPlugin)
4231+
4232++set (COMPIZ_EXPO_PLUGIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
4233++
4234+ add_subdirectory (src/click_threshold)
4235+ include_directories (src/click_threshold/include)
4236++add_subdirectory (src/wall_offset)
4237++include_directories (src/wall_offset/include)
4238++add_subdirectory (src/windows_on_viewport)
4239++include_directories (src/windows_on_viewport/include)
4240+
4241+-compiz_plugin (expo PLUGINDEPS composite opengl LIBRARIES compiz_expo_click_threshold)
4242++compiz_plugin (expo PLUGINDEPS composite opengl LIBRARIES
4243++ compiz_expo_click_threshold
4244++ compiz_expo_wall_offset
4245++ compiz_expo_windows_on_viewport)
4246+Index: ubuntu/plugins/expo/src/windows_on_viewport/CMakeLists.txt
4247+===================================================================
4248+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4249++++ ubuntu/plugins/expo/src/windows_on_viewport/CMakeLists.txt 2012-09-08 11:51:33.107328243 +0800
4250+@@ -0,0 +1,36 @@
4251++include_directories (
4252++ ${CMAKE_CURRENT_SOURCE_DIR}/include
4253++ ${CMAKE_CURRENT_SOURCE_DIR}/src
4254++ ${COMPIZ_INCLUDE_DIRS}
4255++ ${COMPIZ_EXPO_PLUGIN_SOURCE_DIR}
4256++ ${Boost_INCLUDE_DIRS}
4257++ ${GLIBMM_INCLUDE_DIRS}
4258++)
4259++
4260++link_directories (${GLIBMM_LIBRARY_DIRS} ${COMPIZ_LIBRARY_DIRS})
4261++
4262++set (
4263++ PRIVATE_HEADERS
4264++ ${CMAKE_CURRENT_SOURCE_DIR}/include/windows-on-viewport.h
4265++)
4266++
4267++set (
4268++ SRCS
4269++ ${CMAKE_CURRENT_SOURCE_DIR}/src/windows-on-viewport.cpp
4270++)
4271++
4272++add_library (
4273++ compiz_expo_windows_on_viewport STATIC
4274++ ${SRCS}
4275++ ${PRIVATE_HEADERS}
4276++)
4277++
4278++if (COMPIZ_BUILD_TESTING)
4279++ add_subdirectory ( ${CMAKE_CURRENT_SOURCE_DIR}/tests )
4280++endif (COMPIZ_BUILD_TESTING)
4281++
4282++target_link_libraries (
4283++ compiz_expo_windows_on_viewport
4284++ compiz_window_geometry
4285++ compiz_core
4286++)
4287+Index: ubuntu/plugins/expo/src/windows_on_viewport/include/windows-on-viewport.h
4288+===================================================================
4289+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4290++++ ubuntu/plugins/expo/src/windows_on_viewport/include/windows-on-viewport.h 2012-09-08 15:17:24.196573992 +0800
4291+@@ -0,0 +1,40 @@
4292++/**
4293++ * Copyright © 2012 Canonical Ltd.
4294++ *
4295++ * Authors:
4296++ * Sam Spilsbury <sam.spilsbury@canonical.com>
4297++ *
4298++ * This program is free software; you can redistribute it and/or
4299++ * modify it under the terms of the GNU General Public License
4300++ * as published by the Free Software Foundation; either version 2
4301++ * of the License, or (at your option) any later version.
4302++ *
4303++ * This program is distributed in the hope that it will be useful,
4304++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4305++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4306++ * GNU General Public License for more details.
4307++ *
4308++ **/
4309++#ifndef _COMPIZ_EXPO_WINDOWS_ON_VIEWPORT_H
4310++#define _COMPIZ_EXPO_WINDOWS_ON_VIEWPORT_H
4311++
4312++#include <core/point.h>
4313++#include <core/size.h>
4314++#include <core/rect.h>
4315++#include "client-list-generator.h"
4316++
4317++namespace compiz
4318++{
4319++ namespace expo
4320++ {
4321++ unsigned int countViewports (const CompSize &vpSize);
4322++
4323++ void activeViewportsForMembers (compiz::expo::ClientListGenerator &clientList,
4324++ const CompPoint &cursor,
4325++ const CompSize &vpSize,
4326++ const CompSize &screenSize,
4327++ std::vector <bool> &viewportActiveStates);
4328++ }
4329++}
4330++
4331++#endif
4332+Index: ubuntu/plugins/expo/src/windows_on_viewport/src/windows-on-viewport.cpp
4333+===================================================================
4334+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4335++++ ubuntu/plugins/expo/src/windows_on_viewport/src/windows-on-viewport.cpp 2012-09-08 15:19:23.513165649 +0800
4336+@@ -0,0 +1,80 @@
4337++/**
4338++ * Copyright © 2012 Canonical Ltd.
4339++ *
4340++ * Authors:
4341++ * Sam Spilsbury <sam.spilsbury@canonical.com>
4342++ *
4343++ * This program is free software; you can redistribute it and/or
4344++ * modify it under the terms of the GNU General Public License
4345++ * as published by the Free Software Foundation; either version 2
4346++ * of the License, or (at your option) any later version.
4347++ *
4348++ * This program is distributed in the hope that it will be useful,
4349++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4350++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4351++ * GNU General Public License for more details.
4352++ *
4353++ **/
4354++#include <cstdio>
4355++#include <algorithm>
4356++#include "windows-on-viewport.h"
4357++#include "viewport-member-window.h"
4358++
4359++namespace compiz
4360++{
4361++ namespace expo
4362++ {
4363++ unsigned int countViewports (const CompSize &vpSize)
4364++ {
4365++ return vpSize.width () * vpSize.height ();
4366++ }
4367++
4368++ void fillInNewViewportActiveData (unsigned int vpCount,
4369++ std::vector <bool> &vpActive)
4370++ {
4371++ if (vpActive.size () < vpCount)
4372++ {
4373++ unsigned int last = vpActive.size () - 1;
4374++ vpActive.resize (vpCount);
4375++ for (unsigned int i = last; i < vpActive.size (); i++)
4376++ vpActive[i] = false;
4377++ }
4378++ }
4379++
4380++ void activeViewportsForMembers (compiz::expo::ClientListGenerator &clientList,
4381++ const CompPoint &cursor,
4382++ const CompSize &vpSize,
4383++ const CompSize &screenSize,
4384++ std::vector <bool> &viewportActiveStates)
4385++ {
4386++ compiz::expo::ViewportMemberWindow *vpMemberWindow = clientList.nextClient ();
4387++
4388++ fillInNewViewportActiveData (countViewports (vpSize), viewportActiveStates);
4389++ std::fill_n (viewportActiveStates.begin (), viewportActiveStates.size (), false);
4390++
4391++ while (vpMemberWindow)
4392++ {
4393++ if (!vpMemberWindow->isDesktopOrDock ())
4394++ {
4395++ CompPoint viewport;
4396++
4397++ /* If this is a dragged window, use the cursor position */
4398++ if (vpMemberWindow->dragged ())
4399++ viewport.set (cursor.x () / screenSize.width (),
4400++ cursor.y () / screenSize.height ());
4401++ else
4402++ {
4403++ const compiz::window::Geometry &geom = vpMemberWindow->absoluteGeometry ();
4404++ viewport.set (geom.centerX () / screenSize.width (),
4405++ geom.centerY () / screenSize.height ());
4406++ }
4407++
4408++ unsigned int vpIndex = vpSize.width () * viewport.y () + viewport.x ();
4409++ viewportActiveStates[vpIndex] = true;
4410++ }
4411++
4412++ vpMemberWindow = clientList.nextClient ();
4413++ }
4414++ }
4415++ }
4416++}
4417+Index: ubuntu/plugins/expo/src/windows_on_viewport/tests/CMakeLists.txt
4418+===================================================================
4419+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4420++++ ubuntu/plugins/expo/src/windows_on_viewport/tests/CMakeLists.txt 2012-09-08 15:06:24.481302659 +0800
4421+@@ -0,0 +1,22 @@
4422++if (NOT GTEST_FOUND)
4423++ message ("Google Test not found - cannot build tests!")
4424++ set (COMPIZ_BUILD_TESTING OFF)
4425++endif (NOT GTEST_FOUND)
4426++
4427++include_directories (${GTEST_INCLUDE_DIRS})
4428++include_directories (${CMAKE_EXPO_PLUGIN_SOURCE_DIR})
4429++
4430++link_directories (${COMPIZ_LIBRARY_DIRS})
4431++
4432++add_executable (compiz_test_expo_windows_on_viewport
4433++ ${CMAKE_CURRENT_SOURCE_DIR}/test-windows-on-viewport.cpp)
4434++
4435++target_link_libraries (compiz_test_expo_windows_on_viewport
4436++ compiz_expo_windows_on_viewport
4437++ ${GTEST_BOTH_LIBRARIES}
4438++ ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
4439++ ${GMOCK_LIBRARY}
4440++ ${GMOCK_MAIN_LIBRARY}
4441++ )
4442++
4443++compiz_discover_tests (compiz_test_expo_windows_on_viewport COVERAGE compiz_expo_windows_on_viewport)
4444+Index: ubuntu/plugins/expo/src/windows_on_viewport/tests/test-windows-on-viewport.cpp
4445+===================================================================
4446+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4447++++ ubuntu/plugins/expo/src/windows_on_viewport/tests/test-windows-on-viewport.cpp 2012-09-08 15:30:17.600409104 +0800
4448+@@ -0,0 +1,149 @@
4449++/*
4450++ * Copyright © 2012 Canonical Ltd.
4451++ *
4452++ * Permission to use, copy, modify, distribute, and sell this software
4453++ * and its documentation for any purpose is hereby granted without
4454++ * fee, provided that the above copyright notice appear in all copies
4455++ * and that both that copyright notice and this permission notice
4456++ * appear in supporting documentation, and that the name of
4457++ * Canonical Ltd. not be used in advertising or publicity pertaining to
4458++ * distribution of the software without specific, written prior permission.
4459++ * Canonical Ltd. makes no representations about the suitability of this
4460++ * software for any purpose. It is provided "as is" without express or
4461++ * implied warranty.
4462++ *
4463++ * CANONICAL, LTD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
4464++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
4465++ * NO EVENT SHALL CANONICAL, LTD. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
4466++ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
4467++ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
4468++ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
4469++ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
4470++ *
4471++ * Authored by: Sam Spilsbury <sam.spilsbury@canonical.com>
4472++ */
4473++#include <gtest/gtest.h>
4474++#include <gmock/gmock.h>
4475++#include "windows-on-viewport.h"
4476++#include "client-list-generator.h"
4477++#include "viewport-member-window.h"
4478++
4479++using ::testing::InSequence;
4480++using ::testing::Return;
4481++using ::testing::ReturnNull;
4482++using ::testing::ReturnRef;
4483++
4484++namespace
4485++{
4486++ namespace ce = compiz::expo;
4487++
4488++ class MockViewportMemberWindow :
4489++ public ce::ViewportMemberWindow
4490++ {
4491++ public:
4492++
4493++ MOCK_CONST_METHOD0 (absoluteGeometry, const compiz::window::Geometry & ());
4494++ MOCK_CONST_METHOD0 (isDesktopOrDock, bool ());
4495++ MOCK_CONST_METHOD0 (dragged, bool ());
4496++ };
4497++
4498++ class MockClientListGenerator :
4499++ public ce::ClientListGenerator
4500++ {
4501++ public:
4502++
4503++ MOCK_METHOD0 (nextClient, ce::ViewportMemberWindow * ());
4504++ };
4505++}
4506++
4507++class ExpoWindowsOnViewportTest :
4508++ public ::testing::Test
4509++{
4510++ protected:
4511++
4512++ MockClientListGenerator mockClientListGenerator;
4513++ std::vector <bool> activeStates;
4514++};
4515++
4516++namespace
4517++{
4518++ const CompSize vpSize (2, 2);
4519++ const CompSize screenSize (1000, 1000);
4520++}
4521++
4522++TEST_F (ExpoWindowsOnViewportTest, TestNoDocksMakeViewportsActive)
4523++{
4524++ MockViewportMemberWindow mockViewportMembers[1];
4525++ InSequence s;
4526++
4527++ EXPECT_CALL (mockClientListGenerator, nextClient ()).WillOnce (Return (&mockViewportMembers[0]));
4528++ EXPECT_CALL (mockViewportMembers[0], isDesktopOrDock ()).WillOnce (Return (true));
4529++ EXPECT_CALL (mockClientListGenerator, nextClient ()).WillOnce (ReturnNull ());
4530++
4531++ compiz::expo::activeViewportsForMembers (mockClientListGenerator,
4532++ CompPoint (1, 1),
4533++ vpSize,
4534++ screenSize,
4535++ activeStates);
4536++
4537++ ASSERT_EQ (activeStates.size (), vpSize.width () * vpSize.height ());
4538++ EXPECT_EQ (activeStates[0], false);
4539++ EXPECT_EQ (activeStates[1], false);
4540++ EXPECT_EQ (activeStates[2], false);
4541++ EXPECT_EQ (activeStates[3], false);
4542++}
4543++
4544++TEST_F (ExpoWindowsOnViewportTest, TestGrabbedWindowUsesCursorPosition)
4545++{
4546++ MockViewportMemberWindow mockViewportMembers[1];
4547++ InSequence s;
4548++
4549++ EXPECT_CALL (mockClientListGenerator, nextClient ()).WillOnce (Return (&mockViewportMembers[0]));
4550++ EXPECT_CALL (mockViewportMembers[0], isDesktopOrDock ()).WillOnce (Return (false));
4551++ EXPECT_CALL (mockViewportMembers[0], dragged ()).WillOnce (Return (true));
4552++ EXPECT_CALL (mockClientListGenerator, nextClient ()).WillOnce (ReturnNull ());
4553++
4554++ compiz::expo::activeViewportsForMembers (mockClientListGenerator,
4555++ CompPoint (screenSize.width () * 1.5,
4556++ screenSize.height () * 1.5),
4557++ vpSize,
4558++ screenSize,
4559++ activeStates);
4560++
4561++ ASSERT_EQ (activeStates.size (), vpSize.width () * vpSize.height ());
4562++ EXPECT_EQ (activeStates[0], false);
4563++ EXPECT_EQ (activeStates[1], false);
4564++ EXPECT_EQ (activeStates[2], false);
4565++ EXPECT_EQ (activeStates[3], true); // 2,2 has the cursor of a dragged window
4566++}
4567++
4568++TEST_F (ExpoWindowsOnViewportTest, TestUngrabbedWindowUsesGeometry)
4569++{
4570++ MockViewportMemberWindow mockViewportMembers[1];
4571++ InSequence s;
4572++
4573++ compiz::window::Geometry vpMemberGeometry1 (screenSize.width () * 1.1,
4574++ screenSize.height () * 1.1,
4575++ screenSize.width () / 2,
4576++ screenSize.height () / 2,
4577++ 0);
4578++
4579++ EXPECT_CALL (mockClientListGenerator, nextClient ()).WillOnce (Return (&mockViewportMembers[0]));
4580++ EXPECT_CALL (mockViewportMembers[0], isDesktopOrDock ()).WillOnce (Return (false));
4581++ EXPECT_CALL (mockViewportMembers[0], dragged ()).WillOnce (Return (false));
4582++ EXPECT_CALL (mockViewportMembers[0], absoluteGeometry ()).WillOnce (ReturnRef (vpMemberGeometry1));
4583++ EXPECT_CALL (mockClientListGenerator, nextClient ()).WillOnce (ReturnNull ());
4584++
4585++ compiz::expo::activeViewportsForMembers (mockClientListGenerator,
4586++ CompPoint (screenSize.width () * 1.5,
4587++ screenSize.height () * 1.5),
4588++ vpSize,
4589++ screenSize,
4590++ activeStates);
4591++
4592++ ASSERT_EQ (activeStates.size (), vpSize.width () * vpSize.height ());
4593++ EXPECT_EQ (activeStates[0], false);
4594++ EXPECT_EQ (activeStates[1], false);
4595++ EXPECT_EQ (activeStates[2], false);
4596++ EXPECT_EQ (activeStates[3], true); // 2,2 has a window on it
4597++}
4598+Index: ubuntu/plugins/expo/src/client-list-generator.h
4599+===================================================================
4600+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4601++++ ubuntu/plugins/expo/src/client-list-generator.h 2012-09-08 11:51:33.111328267 +0800
4602+@@ -0,0 +1,45 @@
4603++/*
4604++ * Copyright © 2012 Canonical Ltd.
4605++ *
4606++ * Permission to use, copy, modify, distribute, and sell this software
4607++ * and its documentation for any purpose is hereby granted without
4608++ * fee, provided that the above copyright notice appear in all copies
4609++ * and that both that copyright notice and this permission notice
4610++ * appear in supporting documentation, and that the name of
4611++ * Canonical Ltd. not be used in advertising or publicity pertaining to
4612++ * distribution of the software without specific, written prior permission.
4613++ * Canonical Ltd. makes no representations about the suitability of this
4614++ * software for any purpose. It is provided "as is" without express or
4615++ * implied warranty.
4616++ *
4617++ * CANONICAL, LTD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
4618++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
4619++ * NO EVENT SHALL CANONICAL, LTD. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
4620++ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
4621++ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
4622++ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
4623++ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
4624++ *
4625++ * Authored by: Sam Spilsbury <sam.spilsbury@canonical.com>
4626++ */
4627++#ifndef _COMPIZ_EXPO_CLIENT_LIST_GENERATOR_H
4628++#define _COMPIZ_EXPO_CLIENT_LIST_GENERATOR_H
4629++
4630++namespace compiz
4631++{
4632++ namespace expo
4633++ {
4634++ class ViewportMemberWindow;
4635++
4636++ class ClientListGenerator
4637++ {
4638++ public:
4639++
4640++ virtual ~ClientListGenerator () {};
4641++ virtual ViewportMemberWindow * nextClient () = 0;
4642++ };
4643++ }
4644++}
4645++#endif
4646++
4647++
4648+Index: ubuntu/plugins/expo/src/viewport-member-window.h
4649+===================================================================
4650+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4651++++ ubuntu/plugins/expo/src/viewport-member-window.h 2012-09-08 13:58:19.753047547 +0800
4652+@@ -0,0 +1,46 @@
4653++/*
4654++ * Copyright © 2012 Canonical Ltd.
4655++ *
4656++ * Permission to use, copy, modify, distribute, and sell this software
4657++ * and its documentation for any purpose is hereby granted without
4658++ * fee, provided that the above copyright notice appear in all copies
4659++ * and that both that copyright notice and this permission notice
4660++ * appear in supporting documentation, and that the name of
4661++ * Canonical Ltd. not be used in advertising or publicity pertaining to
4662++ * distribution of the software without specific, written prior permission.
4663++ * Canonical Ltd. makes no representations about the suitability of this
4664++ * software for any purpose. It is provided "as is" without express or
4665++ * implied warranty.
4666++ *
4667++ * CANONICAL, LTD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
4668++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
4669++ * NO EVENT SHALL CANONICAL, LTD. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
4670++ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
4671++ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
4672++ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
4673++ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
4674++ *
4675++ * Authored by: Sam Spilsbury <sam.spilsbury@canonical.com>
4676++ */
4677++#ifndef _COMPIZ_EXPO_VIEWPORT_MEMBER_WINDOW_H
4678++#define _COMPIZ_EXPO_VIEWPORT_MEMBER_WINDOW_H
4679++
4680++#include <core/windowgeometry.h>
4681++
4682++namespace compiz
4683++{
4684++ namespace expo
4685++ {
4686++ class ViewportMemberWindow
4687++ {
4688++ public:
4689++
4690++ virtual ~ViewportMemberWindow () {};
4691++ virtual const compiz::window::Geometry & absoluteGeometry () const = 0;
4692++ virtual bool dragged () const = 0;
4693++ virtual bool isDesktopOrDock () const = 0;
4694++ };
4695++ }
4696++}
4697++
4698++#endif
4699
4700=== modified file 'debian/patches/series'
4701--- debian/patches/series 2012-06-19 11:22:48 +0000
4702+++ debian/patches/series 2012-09-11 08:44:21 +0000
4703@@ -6,3 +6,4 @@
4704 ccsm_add_first_run_warning.patch
4705 ccsm_disable_unity_checkbox.patch
4706 99_valid_ccsm_desktop_file.patch
4707+100_expo_layout.patch
4708
4709=== modified file 'gtk/gnome/50-compiz-launchers.xml.in'
4710--- gtk/gnome/50-compiz-launchers.xml.in 2012-08-15 14:09:32 +0000
4711+++ gtk/gnome/50-compiz-launchers.xml.in 2012-09-11 08:44:21 +0000
4712@@ -1,6 +1,6 @@
4713 <?xml version="1.0" encoding="UTF-8"?>
4714 <KeyListEntries schema="org.compiz.integrated" wm_name="Compiz" group="system" _name="Launchers" package="compiz">
4715
4716- <KeyListEntry name="exec" _description="Launch Terminal"/>
4717+ <KeyListEntry name="run-command-terminal" _description="Launch Terminal"/>
4718
4719 </KeyListEntries>
4720
4721=== modified file 'gtk/window-decorator/CMakeLists.txt'
4722--- gtk/window-decorator/CMakeLists.txt 2012-05-24 00:55:17 +0000
4723+++ gtk/window-decorator/CMakeLists.txt 2012-09-11 08:44:21 +0000
4724@@ -23,34 +23,99 @@
4725 ${COMPIZ_LINK_DIRS}
4726 )
4727
4728+ add_library (gtk_window_decorator_settings_interface STATIC
4729+ ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-interface.c)
4730+
4731+ add_library (gtk_window_decorator_settings STATIC
4732+ ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings.c)
4733+
4734+ add_library (gtk_window_decorator_settings_storage_interface STATIC
4735+ ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-storage-interface.c)
4736+
4737+ add_library (gtk_window_decorator_settings_storage_xproperty_interface STATIC
4738+ ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-xproperty-interface.c)
4739+
4740+ add_library (gtk_window_decorator_settings_writable_interface STATIC
4741+ ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-writable-interface.c)
4742+
4743+ add_library (gtk_window_decorator_settings_notified_interface
4744+ ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-notified-interface.c)
4745+
4746+ set (GTK_WINDOW_DECORATOR_ADDITIONAL_LIBRARIES
4747+ gtk_window_decorator_settings_notified_interface
4748+ gtk_window_decorator_settings_interface
4749+ gtk_window_decorator_settings_writable_interface
4750+ gtk_window_decorator_settings
4751+ gtk_window_decorator_settings_storage_interface
4752+ gtk_window_decorator_settings_storage_xproperty_interface)
4753+
4754 if (USE_GCONF)
4755- set (gwd_schema ${CMAKE_CURRENT_BINARY_DIR}/gwd.schemas)
4756- compiz_translate_xml (
4757+ set (gwd_schema ${CMAKE_CURRENT_BINARY_DIR}/gwd.schemas)
4758+ compiz_translate_xml (
4759 ${CMAKE_CURRENT_SOURCE_DIR}/gwd.schemas.in
4760 ${gwd_schema}
4761 )
4762 compiz_install_gconf_schema (${CMAKE_CURRENT_BINARY_DIR}/gwd.schemas ${SCHEMADIR})
4763+ add_library (gtk_window_decorator_settings_storage_gconf STATIC
4764+ ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-storage-gconf.c)
4765+ list (APPEND GTK_WINDOW_DECORATOR_ADDITIONAL_LIBRARIES
4766+ gtk_window_decorator_settings_storage_gconf)
4767 endif (USE_GCONF)
4768
4769+ if (USE_GSETTINGS)
4770+ add_definitions (-DUSE_GSETTINGS)
4771+ add_library (gtk_window_decorator_settings_storage_gsettings STATIC
4772+ ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-storage-gsettings.c)
4773+
4774+ compiz_pkg_check_modules (GSETTINGS gio-2.0 glib-2.0)
4775+
4776+ target_link_libraries (gtk_window_decorator_settings_storage_gsettings
4777+ ${GSETTINGS_LIBRARIES})
4778+
4779+ list (APPEND GTK_WINDOW_DECORATOR_ADDITIONAL_LIBRARIES
4780+ gtk_window_decorator_settings_storage_gsettings)
4781+
4782+ set (_gwd_gschema_name org.compiz.gwd)
4783+ set (_gwd_gschema_filename ${_gwd_gschema_name}.gschema.xml)
4784+ set (_gwd_gschema_filepath ${CMAKE_CURRENT_SOURCE_DIR}/${_gwd_gschema_filename})
4785+ set (_gwd_gschema_generated_location ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/${_gwd_gschema_filename})
4786+ set (_gwd_gschema_dest ${CMAKE_INSTALL_PREFIX}/share/glib-2.0/schemas/)
4787+
4788+ add_custom_command (OUTPUT ${_gwd_gschema_generated_location}
4789+ COMMAND cp -r ${_gwd_gschema_filepath} ${_gwd_gschema_generated_location}
4790+ DEPENDS ${_gwd_gschema_filepath}
4791+ VERBATIM)
4792+
4793+ add_custom_target (compiz_gwd_gsettings_org_compiz_gwd_schema ALL
4794+ DEPENDS ${_gwd_gschema_generated_location})
4795+
4796+ add_gsettings_schema_to_recompilation_list (compiz_gwd_gsettings_org_compiz_gwd_schema)
4797+
4798+ compiz_install_gsettings_schema (${_gwd_gschema_generated_location}
4799+ ${_gwd_gschema_dest})
4800+ endif (USE_GSETTINGS)
4801+
4802 add_executable (gtk-window-decorator
4803- gtk-window-decorator.c
4804- blurprops.c
4805- decorprops.c
4806- cairo.c
4807- frames.c
4808- gdk.c
4809- switcher.c
4810- metacity.c
4811- events.c
4812- forcequit.c
4813- tooltip.c
4814- actionmenu.c
4815- settings.c
4816- util.c
4817- style.c
4818- wnck.c
4819- decorator.c
4820- ${gwd_schema}
4821+ gtk-window-decorator.c
4822+ blurprops.c
4823+ decorprops.c
4824+ cairo.c
4825+ frames.c
4826+ gdk.c
4827+ switcher.c
4828+ metacity.c
4829+ events.c
4830+ forcequit.c
4831+ tooltip.c
4832+ actionmenu.c
4833+ settings.c
4834+ util.c
4835+ style.c
4836+ wnck.c
4837+ decorator.c
4838+ ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-xproperty-storage.c
4839+ ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-notified.c
4840+ ${gwd_schema}
4841 )
4842
4843 add_dependencies (gtk-window-decorator decoration)
4844@@ -67,6 +132,7 @@
4845 ${GCONF_LIBRARIES}
4846 ${DBUS_GLIB_LIBRARIES}
4847 ${metacitylibs}
4848+ ${GTK_WINDOW_DECORATOR_ADDITIONAL_LIBRARIES}
4849 )
4850
4851 install (
4852@@ -74,6 +140,9 @@
4853 DESTINATION ${exec_prefix}
4854 )
4855
4856+ if (COMPIZ_BUILD_TESTING)
4857+ add_subdirectory (tests)
4858+ endif (COMPIZ_BUILD_TESTING)
4859
4860 endif (USE_GTK)
4861
4862
4863=== modified file 'gtk/window-decorator/blurprops.c'
4864--- gtk/window-decorator/blurprops.c 2011-02-21 09:53:08 +0000
4865+++ gtk/window-decorator/blurprops.c 2012-09-11 08:44:21 +0000
4866@@ -37,14 +37,17 @@
4867 Display *xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
4868 long *data = NULL;
4869 int size = 0;
4870+ gint blur_type;
4871+
4872+ g_object_get (settings, "blur", &blur_type, NULL);
4873
4874- if (settings->blur_type != BLUR_TYPE_ALL)
4875+ if (blur_type != BLUR_TYPE_ALL)
4876 {
4877 bottom_region = NULL;
4878 left_region = NULL;
4879 right_region = NULL;
4880
4881- if (settings->blur_type != BLUR_TYPE_TITLEBAR)
4882+ if (blur_type != BLUR_TYPE_TITLEBAR)
4883 top_region = NULL;
4884 }
4885
4886
4887=== modified file 'gtk/window-decorator/cairo.c'
4888--- gtk/window-decorator/cairo.c 2012-08-13 05:46:59 +0000
4889+++ gtk/window-decorator/cairo.c 2012-09-11 08:44:21 +0000
4890@@ -354,7 +354,7 @@
4891 {
4892 decor_color_t *title_color = _title_color;
4893
4894- alpha = settings->decoration_alpha + 0.3;
4895+ alpha = decoration_alpha + 0.3;
4896
4897 fill_rounded_rectangle (cr,
4898 x1 + 0.5,
4899@@ -386,7 +386,7 @@
4900 }
4901 else
4902 {
4903- alpha = settings->decoration_alpha;
4904+ alpha = decoration_alpha;
4905
4906 fill_rounded_rectangle (cr,
4907 x1 + 0.5,
4908
4909=== modified file 'gtk/window-decorator/decorator.c'
4910--- gtk/window-decorator/decorator.c 2012-05-27 11:25:24 +0000
4911+++ gtk/window-decorator/decorator.c 2012-09-11 08:44:21 +0000
4912@@ -118,7 +118,11 @@
4913 static const PangoFontDescription *
4914 get_titlebar_font (decor_frame_t *frame)
4915 {
4916- if (settings->use_system_font)
4917+ const gchar *titlebar_font;
4918+ g_object_get (settings, "titlebar-font", &titlebar_font, NULL);
4919+
4920+ /* Using system font */
4921+ if (!titlebar_font)
4922 return NULL;
4923 else
4924 return frame->titlebar_font;
4925@@ -773,12 +777,12 @@
4926 /* create shadow from opaque decoration
4927 * FIXME: Should not modify settings value
4928 * like this */
4929- save_decoration_alpha = settings->decoration_alpha;
4930- settings->decoration_alpha = 1.0;
4931+ save_decoration_alpha = decoration_alpha;
4932+ decoration_alpha = 1.0;
4933
4934 (*d.draw) (&d);
4935
4936- settings->decoration_alpha = save_decoration_alpha;
4937+ decoration_alpha = save_decoration_alpha;
4938
4939 XRenderFillRectangle (xdisplay, PictOpSrc, picture, &white,
4940 c->left_space,
4941@@ -1034,45 +1038,25 @@
4942 cairo_get_shadow (decor_frame_t *d, decor_shadow_options_t *opts, gboolean active)
4943 {
4944 if (active)
4945- {
4946- memcpy (opts->shadow_color, settings->active_shadow_color, sizeof (settings->active_shadow_color));
4947- opts->shadow_radius = settings->active_shadow_radius;
4948- opts->shadow_offset_x = settings->active_shadow_offset_x;
4949- opts->shadow_offset_y = settings->active_shadow_offset_y;
4950- opts->shadow_opacity = settings->active_shadow_opacity;
4951- }
4952- /* TODO: Inactive shadows */
4953+ g_object_get (settings, "active-shadow", &opts, NULL);
4954 else
4955- {
4956- memcpy (opts->shadow_color, settings->inactive_shadow_color, sizeof (settings->inactive_shadow_color));
4957- opts->shadow_radius = settings->inactive_shadow_radius;
4958- opts->shadow_offset_x = settings->inactive_shadow_offset_x;
4959- opts->shadow_offset_y = settings->inactive_shadow_offset_y;
4960- opts->shadow_opacity = settings->inactive_shadow_opacity;
4961- }
4962+ g_object_get (settings, "inactive-shadow", &opts, NULL);
4963 }
4964
4965 void
4966 meta_get_shadow (decor_frame_t *frame, decor_shadow_options_t *opts, gboolean active)
4967 {
4968+ decor_shadow_options_t *setting_opts = NULL;
4969+
4970 if (active)
4971- {
4972- memcpy (opts->shadow_color, settings->active_shadow_color, sizeof (settings->active_shadow_color));
4973- opts->shadow_radius = settings->active_shadow_radius;
4974- opts->shadow_offset_x = settings->active_shadow_offset_x;
4975- opts->shadow_offset_y = settings->active_shadow_offset_y;
4976- opts->shadow_opacity = settings->active_shadow_opacity;
4977- }
4978- /* TODO: Inactive shadows */
4979+ g_object_get (settings, "active-shadow", &setting_opts, NULL);
4980 else
4981+ g_object_get (settings, "inactive-shadow", &setting_opts, NULL);
4982+
4983+ if (setting_opts)
4984 {
4985- memcpy (opts->shadow_color, settings->inactive_shadow_color, sizeof (settings->inactive_shadow_color));
4986- opts->shadow_radius = settings->inactive_shadow_radius;
4987- opts->shadow_offset_x = settings->inactive_shadow_offset_x;
4988- opts->shadow_offset_y = settings->inactive_shadow_offset_y;
4989- opts->shadow_opacity = settings->inactive_shadow_opacity;
4990+ memcpy (opts, setting_opts, sizeof (decor_shadow_options_t));
4991 }
4992-
4993 }
4994
4995 int
4996
4997=== modified file 'gtk/window-decorator/events.c'
4998--- gtk/window-decorator/events.c 2012-07-30 08:50:38 +0000
4999+++ gtk/window-decorator/events.c 2012-09-11 08:44:21 +0000
5000@@ -85,8 +85,11 @@
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: