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

Proposed by Timo Jyrinki
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 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
=== modified file 'AUTHORS'
--- AUTHORS 2012-05-16 17:40:13 +0000
+++ AUTHORS 2012-09-11 08:44:21 +0000
@@ -1,52 +1,63 @@
1Adam Williamson <awilliam@redhat.com>1Adam Williamson <awilliam@redhat.com>
2Adel Gadllah <adel.gadllah@gmail.com>2Adel Gadllah <adel.gadllah@gmail.com>
3Alan Bell <alanbell@ubuntu.com>
3Alan Griffiths <alan.griffiths@canonical.com>4Alan Griffiths <alan.griffiths@canonical.com>
4Alan Griffiths <alan@octopull.co.uk>5Alan Griffiths <alan@octopull.co.uk>
6Alexandros Frantzis <alexandros.frantzis@linaro.org>
5Alyssa Hung <deciare@isisview.org>7Alyssa Hung <deciare@isisview.org>
8Andrea Azzarone <aazarone@gmail.com>
6Andrea Azzarone <azzaronea@gmail.com>9Andrea Azzarone <azzaronea@gmail.com>
7Bellegarde Cedric <gnumdk@gmail.com>10Bellegarde Cedric <gnumdk@gmail.com>
8Bellegarde Cedric <gnumdk@puffy.homelinux.org>11Bellegarde Cedric <gnumdk@puffy.homelinux.org>
9Bryan Nguyen <bnguyen@nvidia.com>12Bryan Nguyen <bnguyen@nvidia.com>
13Cedric <gnumdk@gmail.com>
10C-F Language team <i18n@opencompositing.org>14C-F Language team <i18n@opencompositing.org>
11Cedric <gnumdk@gmail.com>
12Christopher Williams <christopherw@verizon.net>15Christopher Williams <christopherw@verizon.net>
13Christopher Williams <crdlb@compiz-fusion.org>16Christopher Williams <crdlb@compiz-fusion.org>
17compiz <compiz@opencompositing.org>
14Compiz Fusion l10n team <i18n@opencompositing.org>18Compiz Fusion l10n team <i18n@opencompositing.org>
15Dan Winship <danw@novell.com>19Daniel d'Andrada <daniel.dandrada@canonical.com>
16Dan Winship <danw@twelve-monkeys.boston.ximian.com>
17Daniel Lea <danlea@gmail.com>20Daniel Lea <danlea@gmail.com>
18Daniel Nylander <po@danielnylander.se>21Daniel Nylander <po@danielnylander.se>
22Daniel van Vugt <daniel.van.vugt@canonical.com>
19Daniel van Vugt <vanvugt@gmail.com>23Daniel van Vugt <vanvugt@gmail.com>
20Danny Baumann <daba@mobilrechner.localdomain>24Danny Baumann <daba@mobilrechner.localdomain>
21Danny Baumann <daba@rechenknecht.peppercon.de>25Danny Baumann <daba@rechenknecht.peppercon.de>
22Danny Baumann <dannybaumann@web.de>26Danny Baumann <dannybaumann@web.de>
27Dan Winship <danw@novell.com>
28Dan Winship <danw@twelve-monkeys.boston.ximian.com>
23David Reveman <c99drn@cs.umu.se>29David Reveman <c99drn@cs.umu.se>
24David Reveman <david@ion.(none)>30David Reveman <david@ion.(none)>
25David Reveman <davidr@novell.com>31David Reveman <davidr@novell.com>
26Dennis Kasprzyk <onestone@beryl-project.org>32Dennis Kasprzyk <onestone@beryl-project.org>
27Dennis Kasprzyk <onestone@compiz-fusion.org>33Dennis Kasprzyk <onestone@compiz-fusion.org>
28Dennis Kasprzyk <onestone@opencompositing.org>34Dennis Kasprzyk <onestone@opencompositing.org>
35Didier Roche <didier.roche@canonical.com>
29Didier Roche <didrocks@ubuntu.com>36Didier Roche <didrocks@ubuntu.com>
30Diogo Ferreira <diogo@underdev.org>37Diogo Ferreira <diogo@underdev.org>
31Dominique Leuenberger <dimstar@opensuse.org>38Dominique Leuenberger <dimstar@opensuse.org>
32Dominique Leuenberger <dominique@leuenberger.net>39Dominique Leuenberger <dominique@leuenberger.net>
33Dominique Leuenberger <dominique@messiah.leuenberger.net>40Dominique Leuenberger <dominique@messiah.leuenberger.net>
41dragoran <drago01@gmail.com>
34Eduardo Gurgel Pinho <eduardo@mad4.Chagas>42Eduardo Gurgel Pinho <eduardo@mad4.Chagas>
35Erkin Bahceci <erkinbah@gmail.com>43Erkin Bahceci <erkinbah@gmail.com>
36Gabor Kelemen <kelemeng@ubuntu.com>44Gabor Kelemen <kelemeng@ubuntu.com>
45gandalfn <gandalfn@club-internet.fr>
37Gerd Kohlberger <lowfi@chello.at>46Gerd Kohlberger <lowfi@chello.at>
38Guillaume <ixcemix@gmail.com>47Guillaume <ixcemix@gmail.com>
39Guillaume Seguin <guillaume@segu.in>48Guillaume Seguin <guillaume@segu.in>
49G. Uitslag <klapinklapin@gmail.com>
40James Jones <jajones@jatest.nvidia.com>50James Jones <jajones@jatest.nvidia.com>
41Jason Smith <jason.smith@canonical.com>51Jason Smith <jason.smith@canonical.com>
42Jay Catherwood <jay.catherwood@gmail.com>52Jay Catherwood <jay.catherwood@gmail.com>
43Jeremy C. Reed <reed@reedmedia.net>53Jeremy C. Reed <reed@reedmedia.net>
44Jigish Gohil <cyberorg@opensuse.org name = Jigish Gohil>54Jigish Gohil <cyberorg@opensuse.org name = Jigish Gohil>
45Jigish Gohil <cyberorg@prime.cyberorg.info>55Jigish Gohil <cyberorg@prime.cyberorg.info>
56Joel Bosveld <joel.bosveld@gmail.com>
46Joel Bosveld <Joel.Bosveld@gmail.com>57Joel Bosveld <Joel.Bosveld@gmail.com>
47Joel Bosveld <joel.bosveld@gmail.com>
48Julian Sikorski <lordzanon@poczta.onet.pl>58Julian Sikorski <lordzanon@poczta.onet.pl>
49Jürgen Kreileder <jk@blackdown.de>59Jürgen Kreileder <jk@blackdown.de>
60Keith Madill <sciso@hotmail.co.uk>
50Kristian Hogsberg <krh@bitplanet.net>61Kristian Hogsberg <krh@bitplanet.net>
51Kristian Høgsberg <krh@redhat.com>62Kristian Høgsberg <krh@redhat.com>
52Kristian Lyngstol <kristian@beryl-project.org>63Kristian Lyngstol <kristian@beryl-project.org>
@@ -54,11 +65,16 @@
54Kristopher Ives <kris@leetbook2.(none)>65Kristopher Ives <kris@leetbook2.(none)>
55Kristopher Ives <kristopher.ives@gmail.com>66Kristopher Ives <kristopher.ives@gmail.com>
56Lubos Lunak <llunak@novell.com>67Lubos Lunak <llunak@novell.com>
68Łukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com>
69MC Return <mcr2010@mcr2010-HP-Compaq-dc7700-Convertible-Minitower>
70MC Return <mc.return@gmx.net>
57Michael Vogt <mvo@ubuntu.com>71Michael Vogt <mvo@ubuntu.com>
72mike@blueroot.co.uk <mike@blueroot.co.uk>
58Mike Cook <mcook@novell.com>73Mike Cook <mcook@novell.com>
59Mike Dransfield <mike@blueroot.co.uk>74Mike Dransfield <mike@blueroot.co.uk>
60Mikkel Kamstrup Erlandsen <mikkel.kamstrup@canonical.com>75Mikkel Kamstrup Erlandsen <mikkel.kamstrup@canonical.com>
61Mirco Muller <macslow@bangang.de>76Mirco Muller <macslow@bangang.de>
77moppsy <moppsy@comcast.net>
62Nicolas Delvaux <contact@nicolas-delvaux.org>78Nicolas Delvaux <contact@nicolas-delvaux.org>
63Nicolas Viennot <nicolas@viennot.biz>79Nicolas Viennot <nicolas@viennot.biz>
64Owen W. Taylor <otaylor@fishsoup.net>80Owen W. Taylor <otaylor@fishsoup.net>
@@ -69,42 +85,46 @@
69Quinn Storm <livinglatexkali@gmail.com>85Quinn Storm <livinglatexkali@gmail.com>
70Quinn Storm <quinn@quinn-laptop.(none)>86Quinn Storm <quinn@quinn-laptop.(none)>
71Randolph Chung <randolph@tausq.org>87Randolph Chung <randolph@tausq.org>
72Rob Taylor <rob.taylor@codethink.co.uk>88Renato Araujo Oliveira Filho <renato.filho@canonical.com>
73Robert Ancell <robert.ancell@canonical.com>89Robert Ancell <robert.ancell@canonical.com>
74Robert Carr <racarr@gorbie.(none)>90Robert Carr <racarr@gorbie.(none)>
75Robert Carr <robb@gorbachev.(none)>91Robert Carr <robb@gorbachev.(none)>
76Robert Noland <rnoland@rnoland-ibm.acs.internap.com>92Robert Noland <rnoland@rnoland-ibm.acs.internap.com>
93Rob Taylor <rob.taylor@codethink.co.uk>
94Rock <rockbuntu@mailinator.com>
77Roi Cohen <racarr@gorbie.(none)>95Roi Cohen <racarr@gorbie.(none)>
78Roi Cohen <roico.beryl@gmail.com>96Roi Cohen <roico.beryl@gmail.com>
79Roland Baer <roland@Vista.(none)>97Roland Baer <roland@Vista.(none)>
80Roland Bar <roland@verifysoft.de>98Roland Bar <roland@verifysoft.de>
99Roland Bär <roland@verifysoft.de>
81Roland Bär <roland@Vista.(none)>100Roland Bär <roland@Vista.(none)>
82Roland Bär <roland@verifysoft.de>
83Sam <smspillaz@gmail.com>101Sam <smspillaz@gmail.com>
102Sam Spilsbury <sam.spilsbury@canonical.com>
84Sam Spilsbury <Sam@XPS-SUSE.site>103Sam Spilsbury <Sam@XPS-SUSE.site>
104Sam Spilsbury <smspillaz@gmail.com>
85Sam Spilsbury <SmSpillaz@gmail.com>105Sam Spilsbury <SmSpillaz@gmail.com>
86Sam Spilsbury <sam.spilsbury@canonical.com>106Sam Spilsbury <smspillaz@smspillaz-desktop.(none)>
87Sam Spilsbury <smspillaz@XPS-FEDORA.(none)>107Sam Spilsbury <smspillaz@XPS-FEDORA.(none)>
88Sam Spilsbury <smspillaz@XPS-U.(none)>108Sam Spilsbury <smspillaz@XPS-U.(none)>
89Sam Spilsbury <smspillaz@gmail.com>
90Sam Spilsbury <smspillaz@smspillaz-desktop.(none)>
91Scott Moreau <oreaus@gmail.com>109Scott Moreau <oreaus@gmail.com>
110scott <scott@box1.localdomain>
92Sebasian Billaudelle <stein@cream-project.org>111Sebasian Billaudelle <stein@cream-project.org>
112Sebastien Bacher <seb128@ubuntu.com>
113smspillaz <sam.spilsbury@canonical.com>
114Søren Sandmann <sandmann@redhat.com>
93Steven Robertson <nihilismwow@gmail.com>115Steven Robertson <nihilismwow@gmail.com>
94Stjepan Glavina <stjepang@gmail.com>116Stjepan Glavina <stjepang@gmail.com>
95Søren Sandmann <sandmann@redhat.com>
96Thierry Reding <thierry@gilfi.de>117Thierry Reding <thierry@gilfi.de>
118Thomas Thurman <thomas.thurman@canonical.com>
119Thomas Voß
97Thomas Voss <thomas.voss@canonical.com>120Thomas Voss <thomas.voss@canonical.com>
121Time Penhey <tim.penhey@canonical.com>
122timo.jyrinki@canonical.com
98Tim Penhey <tim.penhey@canonical.com>123Tim Penhey <tim.penhey@canonical.com>
99Time Penhey <tim.penhey@canonical.com>
100Tomas Carnecky <tom@dbservice.com>124Tomas Carnecky <tom@dbservice.com>
101Travis Watkins <amaranth@ubuntu.com>125Travis Watkins <amaranth@ubuntu.com>
126Ugo Riboni <ugo.riboni@canonical.com>
102Unity <unity@VB-U1010.(none)>127Unity <unity@VB-U1010.(none)>
103Ville Syrjala <syrjala@sci.fi>128Ville Syrjala <syrjala@sci.fi>
104Zack Rusin <zack@kde.org>129Zack Rusin <zack@kde.org>
105dragoran <drago01@gmail.com>
106gandalfn <gandalfn@club-internet.fr>
107mike@blueroot.co.uk <mike@blueroot.co.uk>
108moppsy <moppsy@comcast.net>
109scott <scott@box1.localdomain>
110Δημήτρης (djdoo) <jimdusis@yahoo.gr>130Δημήτρης (djdoo) <jimdusis@yahoo.gr>
111131
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2012-08-24 13:41:00 +0000
+++ CMakeLists.txt 2012-09-11 08:44:21 +0000
@@ -86,8 +86,6 @@
86set (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)86set (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)
87set (GETTEXT_PACKAGE compiz)87set (GETTEXT_PACKAGE compiz)
8888
89find_package (Boost 1.34.0 REQUIRED serialization)
90
91set (COMPIZ_REQUIRES89set (COMPIZ_REQUIRES
92 x1190 x11
93 xext91 xext
@@ -112,12 +110,8 @@
112compiz_pkg_check_modules (COMPIZ REQUIRED ${COMPIZ_REQUIRES})110compiz_pkg_check_modules (COMPIZ REQUIRED ${COMPIZ_REQUIRES})
113compiz_pkg_check_modules (LIBDECORATION REQUIRED ${DECORATION_REQUIRES})111compiz_pkg_check_modules (LIBDECORATION REQUIRED ${DECORATION_REQUIRES})
114112
115list (APPEND COMPIZ_LIBRARIES ${Boost_LIBRARIES})
116
117include (CompizDefaults)113include (CompizDefaults)
118114
119set (COMPIZ_CFLAGS "${COMPIZ_CFLAGS} -I${Boost_INCLUDE_DIR}")
120
121set (_compiz_package_string "Compiz ${VERSION}")115set (_compiz_package_string "Compiz ${VERSION}")
122set (_compiz_package "Compiz")116set (_compiz_package "Compiz")
123117
124118
=== modified file 'NEWS'
--- NEWS 2012-08-23 07:09:48 +0000
+++ NEWS 2012-09-11 08:44:21 +0000
@@ -1,3 +1,60 @@
1Release 0.9.8.2 (2012-09-10 Daniel van Vugt <daniel.van.vugt@canonical.com>)
2============================================================================
3
4Highlights
5
6 * gtk-window-decorator has been fully ported from GConf to GSettings.
7 * Gamers rejoice! CCSM > Composite > "Unredirect Fullscreen Windows" now
8 works more reliably, with a few bugs remaining. If you turn it on then
9 fullscreen windows like games will get direct rendering access and won't
10 be slowed by Compiz (or Unity) any more.
11
12Bugs Fixed (https://launchpad.net/compiz/+milestone/0.9.8.2)
13
14 956986 - compiz crashed with SIGSEGV when imgsvg is loaded, in
15 getCompPluginVTable20090315_imgsvg() from dlloaderLoadPlugin()
16 from CompPlugin::load()
17 974242 - Compiz is moving windows against my will
18 976032 - Place plugin problem with panel in fullscreen and gnome classic
19 980663 - Compiz won't start if "unredirect fullscreen windows" is enabled
20 1014986 - [performance] compiz is wasting CPU responding to repaint
21 requests for offscreen windows
22 1024214 - Tests can disappear from make test when CMake regenerates
23 CTestTestfile.cmake
24 1040081 - [regression] Week 34: Ctrl+Alt+T shortcut (open terminal) fails
25 to work
26 1040455 - Setting the UnMinimize animation is ignored (default animation
27 still used)
28 1041047 - Unredirect Fullscreen Windows stay on top (unredirected) even
29 when they're not on top any more (or the output is transformed)
30 1041066 - Unredirect Fullscreen Windows sometimes fails to unredirect
31 fullscreen windows at all
32 1041310 - compiz 0.9.8.0 rev3321 fails to build on kde4-window-decorator
33 1042095 - AUTHORS is out of date in compiz-0.9.8.0. Needs to be updated
34 from the bzr log.
35 1043143 - Unresolved symbols in plugins are not detected at build time,
36 instead cause cryptic crashes in COMPIZ_PLUGIN_20090315()
37 1045191 - compiz crashed with SIGABRT in assert from
38 boost::shared_ptr<CompRect>::operator-> from
39 ResizeLogic::enableOrDisableVerticalMaximization() from
40 ResizeLogic::handleMotionEvent()
41 1045235 - Compiz crashed with SIGFPE in addQuads()
42 [plugins/opengl/src/paint.cpp:839]
43 1045652 - UnMinimize should be spelled "Unminimize"
44 1045665 - CMake Error at cmake/EnableCoverageReport.cmake:69
45 (SET_TARGET_PROPERTIES): set_target_properties Can not find
46 target to add properties to:
47 compizconfig_ccs_settings_upgrade_internal
48 1046184 - __pyx_f_12compizconfing_ListToStringList defined but not used
49 1046190 - Migration to gsettings doesn't migrate compiz/unity configurable
50 keys to g-c-c and those keys doesn't work
51 1046199 - Changing a key to org.compiz.integrated schema doesn't impact
52 the current profile
53 1046212 - show-hud integration does not work
54 1046661 - Unredirect Fullscreen Windows stay on top (unredirected) even
55 when an RGBA window is stacked above it
56
57
1Release 0.9.8.0 (2012-08-23 Daniel van Vugt <daniel.van.vugt@canonical.com>)58Release 0.9.8.0 (2012-08-23 Daniel van Vugt <daniel.van.vugt@canonical.com>)
2============================================================================59============================================================================
360
461
=== modified file 'VERSION'
--- VERSION 2012-08-23 04:26:34 +0000
+++ VERSION 2012-09-11 08:44:21 +0000
@@ -1,1 +1,1 @@
10.9.8.010.9.8.2
22
=== modified file 'cmake/CompizCommon.cmake'
--- cmake/CompizCommon.cmake 2012-08-22 01:21:08 +0000
+++ cmake/CompizCommon.cmake 2012-09-11 08:44:21 +0000
@@ -40,7 +40,7 @@
40)40)
4141
42# Almost everything is a shared library now, so almost everything needs -fPIC42# Almost everything is a shared library now, so almost everything needs -fPIC
43set (COMMON_FLAGS "-fPIC -Wall")43set (COMMON_FLAGS "-fPIC -Wall -Wl,-zdefs")
4444
45option (COMPIZ_DEPRECATED_WARNINGS "Warn about declarations marked deprecated" OFF)45option (COMPIZ_DEPRECATED_WARNINGS "Warn about declarations marked deprecated" OFF)
46if (NOT COMPIZ_DEPRECATED_WARNINGS)46if (NOT COMPIZ_DEPRECATED_WARNINGS)
4747
=== modified file 'cmake/CompizGSettings.cmake'
--- cmake/CompizGSettings.cmake 2012-07-29 03:23:28 +0000
+++ cmake/CompizGSettings.cmake 2012-09-11 08:44:21 +0000
@@ -63,6 +63,7 @@
63 find_program (PKG_CONFIG_TOOL pkg-config)63 find_program (PKG_CONFIG_TOOL pkg-config)
64 find_program (GLIB_COMPILE_SCHEMAS glib-compile-schemas)64 find_program (GLIB_COMPILE_SCHEMAS glib-compile-schemas)
65 mark_as_advanced (FORCE PKG_CONFIG_TOOL)65 mark_as_advanced (FORCE PKG_CONFIG_TOOL)
66 mark_as_advanced (GLIB_COMPILE_SCHEMAS)
6667
67 # find out where schemas need to go if we are installing them systemwide68 # find out where schemas need to go if we are installing them systemwide
68 execute_process (COMMAND ${PKG_CONFIG_TOOL} glib-2.0 --variable prefix OUTPUT_VARIABLE GSETTINGS_GLIB_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE)69 execute_process (COMMAND ${PKG_CONFIG_TOOL} glib-2.0 --variable prefix OUTPUT_VARIABLE GSETTINGS_GLIB_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -107,12 +108,16 @@
107108
108function (add_gsettings_schema_to_recompilation_list _target_name_for_schema)109function (add_gsettings_schema_to_recompilation_list _target_name_for_schema)
109110
111 find_program (GLIB_COMPILE_SCHEMAS glib-compile-schemas)
112 mark_as_advanced (GLIB_COMPILE_SCHEMAS)
113
110 get_property (GSETTINGS_LOCAL_COMPILE_TARGET_SET114 get_property (GSETTINGS_LOCAL_COMPILE_TARGET_SET
111 GLOBAL115 GLOBAL
112 PROPERTY GSETTINGS_LOCAL_COMPILE_TARGET_SET116 PROPERTY GSETTINGS_LOCAL_COMPILE_TARGET_SET
113 SET)117 SET)
114118
115 if (NOT GSETTINGS_LOCAL_COMPILE_TARGET_SET)119 if (NOT GSETTINGS_LOCAL_COMPILE_TARGET_SET AND
120 GLIB_COMPILE_SCHEMAS)
116121
117 add_custom_command (OUTPUT ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/gschemas.compiled122 add_custom_command (OUTPUT ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/gschemas.compiled
118 COMMAND ${GLIB_COMPILE_SCHEMAS} --targetdir=${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/123 COMMAND ${GLIB_COMPILE_SCHEMAS} --targetdir=${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/
@@ -127,7 +132,8 @@
127 PROPERTY GSETTINGS_LOCAL_COMPILE_TARGET_SET132 PROPERTY GSETTINGS_LOCAL_COMPILE_TARGET_SET
128 TRUE)133 TRUE)
129134
130 endif (NOT GSETTINGS_LOCAL_COMPILE_TARGET_SET)135 endif (NOT GSETTINGS_LOCAL_COMPILE_TARGET_SET AND
136 GLIB_COMPILE_SCHEMAS)
131137
132 add_dependencies (compiz_gsettings_compile_local138 add_dependencies (compiz_gsettings_compile_local
133 ${_target_name_for_schema})139 ${_target_name_for_schema})
134140
=== modified file 'cmake/CompizPlugin.cmake'
--- cmake/CompizPlugin.cmake 2012-05-26 10:52:26 +0000
+++ cmake/CompizPlugin.cmake 2012-09-11 08:44:21 +0000
@@ -75,8 +75,6 @@
7575
76### Set up core lib dependences so this in correctly imported into plugins76### Set up core lib dependences so this in correctly imported into plugins
7777
78find_package (Boost 1.34.0 REQUIRED serialization)
79
80set (COMPIZ_REQUIRES78set (COMPIZ_REQUIRES
81 x1179 x11
82 xext80 xext
@@ -94,7 +92,6 @@
94)92)
9593
96compiz_pkg_check_modules (COMPIZ REQUIRED ${COMPIZ_REQUIRES})94compiz_pkg_check_modules (COMPIZ REQUIRED ${COMPIZ_REQUIRES})
97
98list (APPEND COMPIZ_LIBRARIES ${Boost_LIBRARIES})95list (APPEND COMPIZ_LIBRARIES ${Boost_LIBRARIES})
9996
100# determinate installation directories97# determinate installation directories
10198
=== modified file 'cmake/FindCompiz.cmake'
--- cmake/FindCompiz.cmake 2012-08-21 10:11:51 +0000
+++ cmake/FindCompiz.cmake 2012-09-11 08:44:21 +0000
@@ -1,11 +1,8 @@
1
2
3
4################################################################################1################################################################################
5#2#
6# FindCompiz3# FindCompiz
7#4#
8# This module finds Compiz (www.compiz.org). It uses the FindPkgConfig to5# This module finds Compiz (https://launchpad.net/compiz). It uses the FindPkgConfig to
9# locate Compiz and adds the Compiz CMake module path to the CMake module path.6# locate Compiz and adds the Compiz CMake module path to the CMake module path.
10# It also loads the CompizDefaults that sets all variables to compile Compiz7# It also loads the CompizDefaults that sets all variables to compile Compiz
11# modules.8# modules.
129
=== modified file 'compizconfig/ccsm/CMakeLists.txt'
--- compizconfig/ccsm/CMakeLists.txt 2012-05-27 14:25:30 +0000
+++ compizconfig/ccsm/CMakeLists.txt 2012-09-11 08:44:21 +0000
@@ -4,11 +4,6 @@
4# Hack4# Hack
5set (CMAKE_PROJECT_NAME ccsm)5set (CMAKE_PROJECT_NAME ccsm)
66
7file (READ ${CMAKE_CURRENT_SOURCE_DIR}/VERSION COMPIZ_RELEASE_VERSION LIMIT 12 OFFSET 0)
8string (STRIP ${COMPIZ_RELEASE_VERSION} COMPIZ_RELEASE_VERSION)
9
10set (VERSION ${COMPIZ_RELEASE_VERSION})
11
12add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/compizconfig_wrapper.c7add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/compizconfig_wrapper.c
13 COMMAND echo \"int main (void) { return 0\; }\" >> ${CMAKE_CURRENT_BINARY_DIR}/compizconfig_wrapper.c8 COMMAND echo \"int main (void) { return 0\; }\" >> ${CMAKE_CURRENT_BINARY_DIR}/compizconfig_wrapper.c
14 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})9 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
@@ -36,14 +31,17 @@
36 ${CMAKE_CURRENT_BINARY_DIR}/build/${PY_BUILD_DIR}/ccm/Window.py31 ${CMAKE_CURRENT_BINARY_DIR}/build/${PY_BUILD_DIR}/ccm/Window.py
37 ${CMAKE_CURRENT_BINARY_DIR}/build/${PY_SCRIPTS_DIR}/ccsm)32 ${CMAKE_CURRENT_BINARY_DIR}/build/${PY_SCRIPTS_DIR}/ccsm)
3833
34file (READ ${CMAKE_SOURCE_DIR}/VERSION COMPIZ_RELEASE_VERSION LIMIT 12 OFFSET 0)
35string (STRIP ${COMPIZ_RELEASE_VERSION} COMPIZ_RELEASE_VERSION)
36set (VERSION ${COMPIZ_RELEASE_VERSION})
37
39add_custom_command (OUTPUT ${PY_CCSM_LIB}38add_custom_command (OUTPUT ${PY_CCSM_LIB}
40 COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/setup.py build --build-base=${CMAKE_CURRENT_BINARY_DIR}/build39 COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/setup.py build --build-base=${CMAKE_CURRENT_BINARY_DIR}/build --version=${VERSION}
41 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}40 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
42 COMMENT "Generating Python Bytecode")41 COMMENT "Generating Python Bytecode")
4342
44add_library (ccsm_wrapper43add_custom_target (ccsm_module ALL DEPENDS
45 ${CMAKE_CURRENT_BINARY_DIR}/compizconfig_wrapper.c44 ${PY_CCSM_LIB})
46 ${PY_CCSM_LIB})
4745
48add_custom_target (uninstall46add_custom_target (uninstall
49 COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/setup.py uninstall --prefix=${CMAKE_INSTALL_PREFIX}47 COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/setup.py uninstall --prefix=${CMAKE_INSTALL_PREFIX}
@@ -52,6 +50,6 @@
5250
53install (CODE51install (CODE
54 "message (\"Installing python files\")52 "message (\"Installing python files\")
55 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)")53 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)")
5654
5755
5856
=== removed file 'compizconfig/ccsm/VERSION'
--- compizconfig/ccsm/VERSION 2012-05-16 17:44:14 +0000
+++ compizconfig/ccsm/VERSION 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
10.9.5.94
20
=== modified file 'compizconfig/ccsm/ccm/Widgets.py'
--- compizconfig/ccsm/ccm/Widgets.py 2011-02-12 18:24:14 +0000
+++ compizconfig/ccsm/ccm/Widgets.py 2012-09-11 08:44:21 +0000
@@ -1335,7 +1335,7 @@
1335 if IconTheme.lookup_icon("ccsm", 64, 0):1335 if IconTheme.lookup_icon("ccsm", 64, 0):
1336 icon = IconTheme.load_icon("ccsm", 64, 0)1336 icon = IconTheme.load_icon("ccsm", 64, 0)
1337 self.set_logo (icon)1337 self.set_logo (icon)
1338 self.set_website ("http://www.compiz-fusion.org")1338 self.set_website ("https://launchpad.net/compiz")
13391339
1340# Error dialog1340# Error dialog
1341#1341#
13421342
=== modified file 'compizconfig/ccsm/setup.py'
--- compizconfig/ccsm/setup.py 2012-05-16 17:44:14 +0000
+++ compizconfig/ccsm/setup.py 2012-09-11 08:44:21 +0000
@@ -5,12 +5,35 @@
5from stat import *5from stat import *
6from distutils.core import setup6from distutils.core import setup
7from distutils.command.install import install as _install7from distutils.command.install import install as _install
8from distutils.command.build import build as _build
8from distutils.command.install_data import install_data as _install_data9from distutils.command.install_data import install_data as _install_data
910
10INSTALLED_FILES = "installed_files"11INSTALLED_FILES = "installed_files"
1112
13class build (_build):
14
15 user_options = _build.user_options[:]
16 user_options.extend ([('version=', None, "Version of the package")])
17
18 def initialize_options(self):
19 self.version = None
20 _build.initialize_options (self)
21
22 def finalize_options(self):
23 _build.finalize_options (self)
24
12class install (_install):25class install (_install):
1326
27 user_options = _install.user_options[:]
28 user_options.extend ([('version=', None, "Version of the package")])
29
30 def initialize_options(self):
31 self.version = None
32 _install.initialize_options (self)
33
34 def finalize_options(self):
35 _install.finalize_options (self)
36
14 def run (self):37 def run (self):
15 _install.run (self)38 _install.run (self)
16 outputs = self.get_outputs ()39 outputs = self.get_outputs ()
@@ -97,16 +120,15 @@
97if sys.argv[1] in ("install", "uninstall") and len (prefix):120if sys.argv[1] in ("install", "uninstall") and len (prefix):
98 sys.argv += ["--prefix", prefix]121 sys.argv += ["--prefix", prefix]
99122
100version_file = open ("VERSION", "r")123for arg in sys.argv:
101version = version_file.read ().strip ()124 if "--version" in arg:
102if "=" in version:125 VERSION = arg.split ("=")[1]
103 version = version.split ("=")[1]
104126
105f = open (os.path.join ("ccm/Constants.py.in"), "rt")127f = open (os.path.join ("ccm/Constants.py.in"), "rt")
106data = f.read ()128data = f.read ()
107f.close ()129f.close ()
108data = data.replace ("@prefix@", prefix)130data = data.replace ("@prefix@", prefix)
109data = data.replace ("@version@", version)131data = data.replace ("@version@", VERSION)
110f = open (os.path.join ("ccm/Constants.py"), "wt")132f = open (os.path.join ("ccm/Constants.py"), "wt")
111f.write (data)133f.write (data)
112f.close ()134f.close ()
@@ -168,16 +190,17 @@
168190
169setup (191setup (
170 name = "ccsm",192 name = "ccsm",
171 version = version,193 version = VERSION,
172 description = "CompizConfig Settings Manager",194 description = "CompizConfig Settings Manager",
173 author = "Patrick Niklaus",195 author = "Patrick Niklaus",
174 author_email = "marex@opencompositing.org",196 author_email = "marex@opencompositing.org",
175 url = "http://www.compiz.org/",197 url = "https://launchpad.net/compiz",
176 license = "GPL",198 license = "GPL",
177 data_files = data_files,199 data_files = data_files,
178 packages = ["ccm"],200 packages = ["ccm"],
179 scripts = ["ccsm"],201 scripts = ["ccsm"],
180 cmdclass = {"uninstall" : uninstall,202 cmdclass = {"build" : build,
203 "uninstall" : uninstall,
181 "install" : install,204 "install" : install,
182 "install_data" : install_data}205 "install_data" : install_data}
183 )206 )
184207
=== modified file 'compizconfig/cmake/exec_setup_py_with_destdir.cmake'
--- compizconfig/cmake/exec_setup_py_with_destdir.cmake 2012-06-30 07:53:38 +0000
+++ compizconfig/cmake/exec_setup_py_with_destdir.cmake 2012-09-11 08:44:21 +0000
@@ -1,6 +1,7 @@
1set (WDIR "" CACHE FORCE "Working Directory")1set (WDIR "" CACHE FORCE "Working Directory")
2set (PREFIX "" CACHE FORCE "Prefix")2set (PREFIX "" CACHE FORCE "Prefix")
3set (SETUP "" CACHE FORCE "Path to setup.py")3set (SETUP "" CACHE FORCE "Path to setup.py")
4set (VERSION "" CACHE FORCE "Version")
45
5set (EXTRAARGS "")6set (EXTRAARGS "")
6set (BUILD_DEB $ENV{COMPIZ_DEB_BUILD})7set (BUILD_DEB $ENV{COMPIZ_DEB_BUILD})
@@ -20,5 +21,5 @@
20 set (EXTRAARGS "--install-layout=deb")21 set (EXTRAARGS "--install-layout=deb")
21endif (BUILD_DEB)22endif (BUILD_DEB)
2223
23execute_process (COMMAND python ${SETUP} install ${EXTRAARGS} --prefix=${PREFIX} ${INSTALL_ROOT_ARGS}24execute_process (COMMAND python ${SETUP} install ${EXTRAARGS} --prefix=${PREFIX} --version=${VERSION} ${INSTALL_ROOT_ARGS}
24 WORKING_DIRECTORY ${WDIR})25 WORKING_DIRECTORY ${WDIR})
2526
=== modified file 'compizconfig/compizconfig-python/CMakeLists.txt'
--- compizconfig/compizconfig-python/CMakeLists.txt 2012-08-16 09:11:10 +0000
+++ compizconfig/compizconfig-python/CMakeLists.txt 2012-09-11 08:44:21 +0000
@@ -4,11 +4,6 @@
4# Hack4# Hack
5set (CMAKE_PROJECT_NAME compizconfig-python)5set (CMAKE_PROJECT_NAME compizconfig-python)
66
7file (READ ${CMAKE_CURRENT_SOURCE_DIR}/VERSION COMPIZ_RELEASE_VERSION LIMIT 12 OFFSET 0)
8string (STRIP ${COMPIZ_RELEASE_VERSION} COMPIZ_RELEASE_VERSION)
9
10set (VERSION ${COMPIZ_RELEASE_VERSION})
11
12add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/compizconfig_wrapper.c7add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/compizconfig_wrapper.c
13 COMMAND echo \"int main (void) { return 0\; }\" >> ${CMAKE_CURRENT_BINARY_DIR}/compizconfig_wrapper.c8 COMMAND echo \"int main (void) { return 0\; }\" >> ${CMAKE_CURRENT_BINARY_DIR}/compizconfig_wrapper.c
14 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})9 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
@@ -27,10 +22,6 @@
27set (PY_SCRIPTS_DIR scripts-${PY_VERSION})22set (PY_SCRIPTS_DIR scripts-${PY_VERSION})
2823
29set (PY_COMPIZCONFIG_SRC ${CMAKE_CURRENT_BINARY_DIR}/compizconfig.c)24set (PY_COMPIZCONFIG_SRC ${CMAKE_CURRENT_BINARY_DIR}/compizconfig.c)
30set (PY_COMPIZCONFIG_VERSION ${CMAKE_CURRENT_BINARY_DIR}/VERSION)
31
32add_custom_command (OUTPUT ${PY_COMPIZCONFIG_VERSION}
33 COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/VERSION ${CMAKE_CURRENT_BINARY_DIR}/VERSION)
3425
35add_custom_command (OUTPUT ${PY_COMPIZCONFIG_SRC}26add_custom_command (OUTPUT ${PY_COMPIZCONFIG_SRC}
36 COMMAND pyrexc -o ${PY_COMPIZCONFIG_SRC} ${CMAKE_CURRENT_SOURCE_DIR}/src/compizconfig.pyx27 COMMAND pyrexc -o ${PY_COMPIZCONFIG_SRC} ${CMAKE_CURRENT_SOURCE_DIR}/src/compizconfig.pyx
@@ -38,27 +29,33 @@
3829
39set (PY_COMPIZCONFIG_LIB ${CMAKE_CURRENT_BINARY_DIR}/build/${PY_BUILD_DIR}/compizconfig.so)30set (PY_COMPIZCONFIG_LIB ${CMAKE_CURRENT_BINARY_DIR}/build/${PY_BUILD_DIR}/compizconfig.so)
4031
32file (READ ${CMAKE_SOURCE_DIR}/VERSION COMPIZ_RELEASE_VERSION LIMIT 12 OFFSET 0)
33string (STRIP ${COMPIZ_RELEASE_VERSION} COMPIZ_RELEASE_VERSION)
34set (VERSION ${COMPIZ_RELEASE_VERSION})
35
36configure_file (${CMAKE_CURRENT_SOURCE_DIR}/compizconfig-python.pc.in
37 ${CMAKE_CURRENT_BINARY_DIR}/compizconfig-python.pc)
38
41add_custom_command (OUTPUT ${PY_COMPIZCONFIG_LIB}39add_custom_command (OUTPUT ${PY_COMPIZCONFIG_LIB}
42 COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/setup.py build --build-base=${CMAKE_CURRENT_BINARY_DIR}/build40 COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/setup.py build --build-base=${CMAKE_CURRENT_BINARY_DIR}/build --version=${VERSION}
43 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}41 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
44 DEPENDS ${PY_COMPIZCONFIG_SRC} ${PY_COMPIZCONFIG_VERSION}42 DEPENDS ${PY_COMPIZCONFIG_SRC} ${PY_COMPIZCONFIG_VERSION} compizconfig
45 COMMENT "Generating Python Bytecode")43 COMMENT "Generating Python Bytecode")
4644
47add_library (compizconfig_wrapper45add_custom_target (compizconfig_python_module ALL DEPENDS
48 ${CMAKE_CURRENT_BINARY_DIR}/compizconfig_wrapper.c46 ${PY_COMPIZCONFIG_LIB})
49 ${PY_COMPIZCONFIG_LIB})
5047
51add_custom_target (uninstall48add_custom_target (uninstall
52 COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/setup.py uninstall --prefix=${CMAKE_INSTALL_PREFIX}49 COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/setup.py uninstall --prefix=${CMAKE_INSTALL_PREFIX}
53 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}50 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
54 COMMENT "Uninstalling Python Files")51 COMMENT "Uninstalling Python Files")
5552
53install (FILES ${CMAKE_CURRENT_BINARY_DIR}/compizconfig-python.pc
54 DESTINATION ${libdir}/pkgconfig)
5655
57install (CODE56install (CODE
58 "message (\"Installing python files\")57 "message (\"Installing python files\")
59 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)")58 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)")
60
61add_dependencies (compizconfig_wrapper compizconfig)
6259
63if (COMPIZ_BUILD_TESTING)60if (COMPIZ_BUILD_TESTING)
6461
6562
=== removed file 'compizconfig/compizconfig-python/VERSION'
--- compizconfig/compizconfig-python/VERSION 2012-05-16 17:43:25 +0000
+++ compizconfig/compizconfig-python/VERSION 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
10.9.5.94
20
=== modified file 'compizconfig/compizconfig-python/compizconfig-python.pc.in'
--- compizconfig/compizconfig-python/compizconfig-python.pc.in 2012-05-16 17:43:25 +0000
+++ compizconfig/compizconfig-python/compizconfig-python.pc.in 2012-09-11 08:44:21 +0000
@@ -5,8 +5,8 @@
5pyexecdir=@pyexecdir@5pyexecdir=@pyexecdir@
66
7Name: compizconfig-python7Name: compizconfig-python
8Version: @VERSION@
8Description: Compiz configuration system bindings9Description: Compiz configuration system bindings
9Version: @VERSION@
1010
11Requires: @CCS_REQUIRES@11Requires: @CCS_REQUIRES@
12Libs: @CCS_LIBS@ -L@libdir@ -lcompizconfig12Libs: @CCS_LIBS@ -L@libdir@ -lcompizconfig
1313
=== modified file 'compizconfig/compizconfig-python/setup.py'
--- compizconfig/compizconfig-python/setup.py 2012-08-16 09:11:10 +0000
+++ compizconfig/compizconfig-python/setup.py 2012-09-11 08:44:21 +0000
@@ -7,21 +7,14 @@
7from distutils.extension import Extension7from distutils.extension import Extension
8import os8import os
9import subprocess9import subprocess
1010import sys
11import unittest11import unittest
12import os
13
14pkg_config_environ = os.environ12pkg_config_environ = os.environ
15pkg_config_environ["PKG_CONFIG_PATH"] = os.getcwd () + "/../libcompizconfig:" + os.environ.get ("PKG_CONFIG_PATH", '')13pkg_config_environ["PKG_CONFIG_PATH"] = os.getcwd () + "/../libcompizconfig:" + os.environ.get ("PKG_CONFIG_PATH", '')
1614
17from distutils.command.build_ext import build_ext15from distutils.command.build_ext import build_ext
18ext_module_src = os.getcwd () + "/compizconfig.c"16ext_module_src = os.getcwd () + "/compizconfig.c"
1917
20version_file = open ("VERSION", "r")
21version = version_file.read ().strip ()
22if "=" in version:
23 version = version.split ("=")[1]
24
25def pkgconfig(*packages, **kw):18def pkgconfig(*packages, **kw):
26 flag_map = {'-I': 'include_dirs', '-L': 'library_dirs', '-l': 'libraries', '-R': 'runtime_library_dirs'}19 flag_map = {'-I': 'include_dirs', '-L': 'library_dirs', '-l': 'libraries', '-R': 'runtime_library_dirs'}
27 cmd = ['pkg-config', '--libs', '--cflags']20 cmd = ['pkg-config', '--libs', '--cflags']
@@ -38,7 +31,9 @@
38 31
39 return kw32 return kw
4033
41VERSION_FILE = os.path.join (os.path.dirname (__file__), "VERSION")34for arg in sys.argv:
35 if "--version" in arg:
36 VERSION = arg.split ("=")[1]
4237
43pkgconfig_libs = subprocess.Popen (["pkg-config", "--libs", "libcompizconfig_internal"], stdout=subprocess.PIPE, env=pkg_config_environ, stderr=open(os.devnull, 'w')).communicate ()[0]38pkgconfig_libs = subprocess.Popen (["pkg-config", "--libs", "libcompizconfig_internal"], stdout=subprocess.PIPE, env=pkg_config_environ, stderr=open(os.devnull, 'w')).communicate ()[0]
4439
@@ -50,8 +45,30 @@
5045
51INSTALLED_FILES = "installed_files"46INSTALLED_FILES = "installed_files"
5247
48class build (_build):
49
50 user_options = _build.user_options[:]
51 user_options.extend ([('version=', None, "Version of the package")])
52
53 def initialize_options(self):
54 self.version = None
55 _build.initialize_options (self)
56
57 def finalize_options(self):
58 _build.finalize_options (self)
59
53class install (_install):60class install (_install):
5461
62 user_options = _install.user_options[:]
63 user_options.extend ([('version=', None, "Version of the package")])
64
65 def initialize_options(self):
66 self.version = None
67 _install.initialize_options (self)
68
69 def finalize_options(self):
70 _install.finalize_options (self)
71
55 def run (self):72 def run (self):
56 _install.run (self)73 _install.run (self)
57 outputs = self.get_outputs ()74 outputs = self.get_outputs ()
@@ -132,15 +149,16 @@
132149
133setup (150setup (
134 name = "compizconfig-python",151 name = "compizconfig-python",
135 version = version,152 version = VERSION,
136 description = "CompizConfig Python",153 description = "CompizConfig Python",
137 url = "http://www.compiz.org/",154 url = "https://launchpad.net/compiz",
138 license = "GPL",155 license = "GPL",
139 maintainer = "Guillaume Seguin",156 maintainer = "Guillaume Seguin",
140 maintainer_email = "guillaume@segu.in",157 maintainer_email = "guillaume@segu.in",
141 cmdclass = {"uninstall" : uninstall,158 cmdclass = {"uninstall" : uninstall,
142 "install" : install,159 "install" : install,
143 "install_data" : install_data,160 "install_data" : install_data,
161 "build" : build,
144 "build_ext" : build_ext,162 "build_ext" : build_ext,
145 "test" : test},163 "test" : test},
146 ext_modules=[ 164 ext_modules=[
147165
=== modified file 'compizconfig/compizconfig-python/src/compizconfig.pyx'
--- compizconfig/compizconfig-python/src/compizconfig.pyx 2012-08-22 05:31:22 +0000
+++ compizconfig/compizconfig-python/src/compizconfig.pyx 2012-09-11 08:44:21 +0000
@@ -383,36 +383,6 @@
383 return ccsSettingGetInfo ((<CCSSetting *> value.parent)).forList.listType383 return ccsSettingGetInfo ((<CCSSetting *> value.parent)).forList.listType
384 else:384 else:
385 return ccsSettingGetType ((<CCSSetting *> value.parent))385 return ccsSettingGetType ((<CCSSetting *> value.parent))
386
387cdef CCSStringList * ListToStringList (object list):
388 if len (list) <= 0:
389 return NULL
390
391 cdef CCSStringList * listStart
392 cdef CCSStringList * stringList
393 cdef CCSStringList * prev
394 cdef CCSString * stringStart
395
396 stringStart = <CCSString *> malloc (sizeof (CCSString))
397
398 stringStart.value = strdup (list[0])
399 listStart = <CCSStringList *> malloc (sizeof (CCSStringList))
400 listStart.data = <CCSString *> stringStart
401 listStart.next = NULL
402 prev = listStart
403
404 for l in list[1:]:
405 stringStart = <CCSString *> malloc (sizeof (CCSString))
406
407 stringStart.value = <char *> strdup (l)
408
409 stringList = <CCSStringList *> malloc (sizeof (CCSStringList))
410 stringList.data = stringStart
411 stringList.next = NULL
412 prev.next = stringList
413 prev = stringList
414
415 return listStart
416 386
417cdef object StringListToList (CCSList * stringList):387cdef object StringListToList (CCSList * stringList):
418 cdef CCSString * string388 cdef CCSString * string
419389
=== removed file 'compizconfig/gconf/VERSION'
--- compizconfig/gconf/VERSION 2012-05-16 17:41:22 +0000
+++ compizconfig/gconf/VERSION 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
10.9.5.2
20
=== removed file 'compizconfig/gsettings/VERSION'
--- compizconfig/gsettings/VERSION 2012-05-16 17:43:47 +0000
+++ compizconfig/gsettings/VERSION 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
10.9.5.2
20
=== modified file 'compizconfig/integration/gnome/gsettings/org.compiz.integrated.gschema.xml'
--- compizconfig/integration/gnome/gsettings/org.compiz.integrated.gschema.xml 2012-08-22 09:15:24 +0000
+++ compizconfig/integration/gnome/gsettings/org.compiz.integrated.gschema.xml 2012-09-11 08:44:21 +0000
@@ -2,19 +2,19 @@
2<schemalist>2<schemalist>
3 <schema path="/org/compiz/integrated/" id="org.compiz.integrated">3 <schema path="/org/compiz/integrated/" id="org.compiz.integrated">
4 <key type="b" name="display-all-workspaces">4 <key type="b" name="display-all-workspaces">
5 <default>false</default>5 <default>true</default>
6 </key>6 </key>
7 <key type="s" name="exec">7 <key type="s" name="exec">
8 <default>""</default>8 <default>"gnome-terminal"</default>
9 </key>9 </key>
10 <key type="s" name="command-window-screenshot">10 <key type="s" name="command-window-screenshot">
11 <default>""</default>11 <default>"gnome-screenshot -w"</default>
12 </key>12 </key>
13 <key type="s" name="command-screenshot">13 <key type="s" name="command-screenshot">
14 <default>""</default>14 <default>"gnome-screenshot"</default>
15 </key>15 </key>
16 <key type="s" name="command-terminal">16 <key type="s" name="command-terminal">
17 <default>""</default>17 <default>"gnome-terminal"</default>
18 </key>18 </key>
19 <key type="as" name="run-command-12">19 <key type="as" name="run-command-12">
20 <default>["Disabled"]</default>20 <default>["Disabled"]</default>
@@ -89,22 +89,22 @@
89 <default>""</default>89 <default>""</default>
90 </key>90 </key>
91 <key type="as" name="run-command-terminal">91 <key type="as" name="run-command-terminal">
92 <default>["Disabled"]</default>92 <default>["&lt;Control&gt;&lt;Alt&gt;t"]</default>
93 </key>93 </key>
94 <key type="as" name="run-command-window-screenshot">94 <key type="as" name="run-command-window-screenshot">
95 <default>["Disabled"]</default>95 <default>["&lt;Alt&gt;Print"]</default>
96 </key>96 </key>
97 <key type="as" name="run-command-screenshot">97 <key type="as" name="run-command-screenshot">
98 <default>["Disabled"]</default>98 <default>["Print"]</default>
99 </key>99 </key>
100 <key type="as" name="panel-main-menu">100 <key type="as" name="panel-main-menu">
101 <default>["Disabled"]</default>101 <default>["&lt;Alt&gt;F1"]</default>
102 </key>102 </key>
103 <key type="as" name="panel-run-dialog">103 <key type="as" name="panel-run-dialog">
104 <default>["Disabled"]</default>104 <default>["&lt;Alt&gt;F2"]</default>
105 </key>105 </key>
106 <key type="as" name="show-hud">106 <key type="as" name="show-hud">
107 <default>["Alt"]</default>107 <default>["&lt;Alt&gt;"]</default>
108 </key>108 </key>
109 </schema>109 </schema>
110</schemalist>110</schemalist>
111111
=== modified file 'compizconfig/integration/gnome/include/ccs_gnome_integration_constants.h'
--- compizconfig/integration/gnome/include/ccs_gnome_integration_constants.h 2012-08-22 09:15:24 +0000
+++ compizconfig/integration/gnome/include/ccs_gnome_integration_constants.h 2012-09-11 08:44:21 +0000
@@ -201,7 +201,7 @@
201 * C doesn't have a concept of "constants" setting201 * C doesn't have a concept of "constants" setting
202 * the array size ...202 * the array size ...
203 */203 */
204#define CCS_GNOME_INTEGRATED_SETTINGS_LIST_SIZE 119204#define CCS_GNOME_INTEGRATED_SETTINGS_LIST_SIZE 120
205205
206typedef struct _CCSGNOMEIntegratedSettingsList206typedef struct _CCSGNOMEIntegratedSettingsList
207{207{
208208
=== modified file 'compizconfig/libcompizconfig/CMakeLists.txt'
--- compizconfig/libcompizconfig/CMakeLists.txt 2012-06-29 19:59:35 +0000
+++ compizconfig/libcompizconfig/CMakeLists.txt 2012-09-11 08:44:21 +0000
@@ -14,20 +14,13 @@
1414
15set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)15set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
1616
17# libcompizconfig package version number17set (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)
18# An odd micro number indicates in-progress development.18set (GETTEXT_PACKAGE libcompizconfig)
19# An even micro number indicates a released version.19
20file (READ ${CMAKE_CURRENT_SOURCE_DIR}/VERSION COMPIZ_RELEASE_VERSION LIMIT 12 OFFSET 0)20file (READ ${CMAKE_SOURCE_DIR}/VERSION COMPIZ_RELEASE_VERSION LIMIT 12 OFFSET 0)
21string (STRIP ${COMPIZ_RELEASE_VERSION} COMPIZ_RELEASE_VERSION)21string (STRIP ${COMPIZ_RELEASE_VERSION} COMPIZ_RELEASE_VERSION)
22
23set (VERSION ${COMPIZ_RELEASE_VERSION})22set (VERSION ${COMPIZ_RELEASE_VERSION})
2423
25set (_libcompizconfig_package_string "LibCompizConfig ${VERSION}")
26set (_libcompizconfig_package "LibCompizCompiz")
27
28set (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)
29set (GETTEXT_PACKAGE libcompizconfig)
30
31configure_file (24configure_file (
32 "${CMAKE_CURRENT_SOURCE_DIR}/config.h.in"25 "${CMAKE_CURRENT_SOURCE_DIR}/config.h.in"
33 "${CMAKE_CURRENT_BINARY_DIR}/config.h"26 "${CMAKE_CURRENT_BINARY_DIR}/config.h"
3427
=== removed file 'compizconfig/libcompizconfig/VERSION'
--- compizconfig/libcompizconfig/VERSION 2012-05-16 17:42:27 +0000
+++ compizconfig/libcompizconfig/VERSION 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
10.9.5.94
20
=== modified file 'compizconfig/libcompizconfig/cmake/FindCompizConfig.cmake'
--- compizconfig/libcompizconfig/cmake/FindCompizConfig.cmake 2010-04-23 12:43:51 +0000
+++ compizconfig/libcompizconfig/cmake/FindCompizConfig.cmake 2012-09-11 08:44:21 +0000
@@ -2,7 +2,7 @@
2#2#
3# FindCompizConfig3# FindCompizConfig
4#4#
5# This module finds LibCompizConfig (www.compiz.org). It uses FindPkgConfig to5# This module finds LibCompizConfig (https://launchpad.net/compiz). It uses FindPkgConfig to
6# locate CompizConfig and adds the CompizConfig CMake module path to the CMake6# locate CompizConfig and adds the CompizConfig CMake module path to the CMake
7# module path. It also loads the LibCompizConfigDefaults that sets all variables7# module path. It also loads the LibCompizConfigDefaults that sets all variables
8# to compile Compiz modules. 8# to compile Compiz modules.
99
=== modified file 'compizconfig/libcompizconfig/include/CMakeLists.txt'
--- compizconfig/libcompizconfig/include/CMakeLists.txt 2012-07-08 07:24:06 +0000
+++ compizconfig/libcompizconfig/include/CMakeLists.txt 2012-09-11 08:44:21 +0000
@@ -4,6 +4,7 @@
4 ccs-list.h4 ccs-list.h
5 ccs-object.h5 ccs-object.h
6 ccs-string.h6 ccs-string.h
7 ccs-setting-types.h
7 ccs.h8 ccs.h
8 )9 )
910
1011
=== modified file 'compizconfig/libcompizconfig/src/CMakeLists.txt'
--- compizconfig/libcompizconfig/src/CMakeLists.txt 2012-07-26 23:11:25 +0000
+++ compizconfig/libcompizconfig/src/CMakeLists.txt 2012-09-11 08:44:21 +0000
@@ -51,6 +51,11 @@
51endif (HAVE_INOTIFY)51endif (HAVE_INOTIFY)
5252
53add_library (53add_library (
54 ccs_settings_upgrade_internal STATIC
55 ccs_settings_upgrade_internal.c
56)
57
58add_library (
54 compizconfig SHARED59 compizconfig SHARED
55 ${LIBCOMPIZCONFIG_FILES}60 ${LIBCOMPIZCONFIG_FILES}
56)61)
@@ -65,7 +70,11 @@
65)70)
6671
67target_link_libraries (72target_link_libraries (
68 compizconfig ${LIBCOMPIZCONFIG_LIBRARIES} m73 compizconfig
74 ${LIBCOMPIZCONFIG_LIBRARIES}
75 m
76 dl
77 ccs_settings_upgrade_internal
69)78)
7079
71#80#
7281
=== added file 'compizconfig/libcompizconfig/src/ccs_settings_upgrade_internal.c'
--- compizconfig/libcompizconfig/src/ccs_settings_upgrade_internal.c 1970-01-01 00:00:00 +0000
+++ compizconfig/libcompizconfig/src/ccs_settings_upgrade_internal.c 2012-09-11 08:44:21 +0000
@@ -0,0 +1,168 @@
1/*
2 * Compiz configuration system library
3 *
4 * Copyright (C) 2012 Canonical Ltd.
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 *
20 * Authored By:
21 * Sam Spilsbury <sam.spilsbury@canonical.com>
22 */
23
24#include "ccs_settings_upgrade_internal.h"
25#include <string.h>
26#include <errno.h>
27#include <stdlib.h>
28#include <stdio.h>
29
30typedef Bool (*CCSProcessTokenizedUpgradeFileFunc) (const char *name,
31 int length,
32 const char *tokenOne,
33 const char *tokenTwo,
34 const char *tokenThree,
35 int foundNumber,
36 void *userData);
37
38static Bool
39isUpgrade (const char *name,
40 int length,
41 const char *tokenOne,
42 const char *tokenTwo,
43 const char *tokenThree,
44 int foundNumber,
45 void *userData)
46{
47 static const char *UPGRADE = "upgrade";
48 static const unsigned int UPGRADE_STR_LEN = 7;
49
50 if (strncmp (tokenThree, UPGRADE, UPGRADE_STR_LEN))
51 return FALSE;
52
53 return TRUE;
54}
55
56typedef struct _FillDomainNumAndProfileData
57{
58 char **domain;
59 char **profile;
60 unsigned int *num;
61} FillDomainNumAndProfileData;
62
63static int
64fillDomainNumAndProfile (const char *name,
65 int length,
66 const char *tokenOne,
67 const char *tokenTwo,
68 const char *tokenThree,
69 int foundNumber,
70 void *userData)
71{
72 FillDomainNumAndProfileData *data = (FillDomainNumAndProfileData *) userData;
73
74 *data->domain = strndup (name, length - (strlen (tokenOne) + 1));
75
76 /* profile.n.upgrade */
77 *data->profile = strndup (tokenOne, strlen (tokenOne) - (strlen (tokenTwo) + 1));
78 *data->num = foundNumber;
79
80 return 1;
81}
82
83static Bool
84ccsDetokenizeUpgradeDomainAndExecuteUserFunc (const char *name,
85 CCSProcessTokenizedUpgradeFileFunc func,
86 void *userData)
87{
88 int length = strlen (name);
89 const char *tok = name;
90 Bool success = FALSE;
91
92 /* Keep removing domains and other bits
93 * until we hit a number that we can parse */
94 while (tok)
95 {
96 long int numTmp = 0;
97 char *nexttok = strchr (tok, '.');
98 char *nextnexttok = NULL;
99 char *bit = NULL;
100
101 if (!nexttok)
102 return FALSE;
103
104 nexttok++;
105 nextnexttok = strchr (nexttok, '.');
106
107 if (!nextnexttok)
108 return FALSE;
109
110 nextnexttok++;
111 bit = strndup (nexttok, strlen (nexttok) - (strlen (nextnexttok) + 1));
112
113 if (sscanf (bit, "%ld", &numTmp) == 1)
114 {
115 if ((*func) (name,
116 length,
117 tok,
118 nexttok,
119 nextnexttok,
120 numTmp,
121 userData))
122 success = TRUE;
123 }
124 else if (errno)
125 perror ("sscanf");
126
127 tok = nexttok;
128 free (bit);
129
130 if (success)
131 return TRUE;
132 }
133
134 return FALSE;
135}
136
137Bool
138ccsUpgradeGetDomainNumAndProfile (const char *name,
139 char **domain,
140 unsigned int *num,
141 char **profile)
142{
143 FillDomainNumAndProfileData data =
144 {
145 domain,
146 profile,
147 num
148 };
149
150 return ccsDetokenizeUpgradeDomainAndExecuteUserFunc (name, fillDomainNumAndProfile, (void *) &data);
151}
152
153int
154ccsUpgradeNameFilter (const char *name)
155{
156 Bool result = FALSE;
157 int length = strlen (name);
158
159 if (length < 7)
160 return 0;
161
162 result = ccsDetokenizeUpgradeDomainAndExecuteUserFunc (name, isUpgrade, NULL);
163
164 if (result)
165 return 1;
166
167 return 0;
168}
0169
=== added file 'compizconfig/libcompizconfig/src/ccs_settings_upgrade_internal.h'
--- compizconfig/libcompizconfig/src/ccs_settings_upgrade_internal.h 1970-01-01 00:00:00 +0000
+++ compizconfig/libcompizconfig/src/ccs_settings_upgrade_internal.h 2012-09-11 08:44:21 +0000
@@ -0,0 +1,41 @@
1/*
2 * Compiz configuration system library
3 *
4 * Copyright (C) 2012 Canonical Ltd.
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 *
20 * Authored By:
21 * Sam Spilsbury <sam.spilsbury@canonical.com>
22 */
23#ifndef _COMPIZCONFIG_CCS_SETTINGS_UPGRADE_INTERNAL_H
24#define _COMPIZCONFIG_CCS_SETTINGS_UPGRADE_INTERNAL_H
25
26#include "ccs-defs.h"
27
28COMPIZCONFIG_BEGIN_DECLS
29
30Bool
31ccsUpgradeGetDomainNumAndProfile (const char *name,
32 char **domain,
33 unsigned int *num,
34 char **profile);
35
36int
37ccsUpgradeNameFilter (const char *name);
38
39COMPIZCONFIG_END_DECLS
40
41#endif
042
=== modified file 'compizconfig/libcompizconfig/src/main.c'
--- compizconfig/libcompizconfig/src/main.c 2012-08-17 07:33:02 +0000
+++ compizconfig/libcompizconfig/src/main.c 2012-09-11 08:44:21 +0000
@@ -38,6 +38,7 @@
3838
39#include "ccs-private.h"39#include "ccs-private.h"
40#include "iniparser.h"40#include "iniparser.h"
41#include "ccs_settings_upgrade_internal.h"
4142
42static void * wrapRealloc (void *o, void *a , size_t b)43static void * wrapRealloc (void *o, void *a , size_t b)
43{44{
@@ -1880,9 +1881,12 @@
1880 }1881 }
1881 case TypeList:1882 case TypeList:
1882 {1883 {
1883 to->forList.listInfo = calloc (1, sizeof (CCSSettingInfo));1884 if (from->forList.listInfo)
1884 1885 {
1885 copyInfo (from->forList.listInfo, to->forList.listInfo, from->forList.listType);1886 to->forList.listInfo = calloc (1, sizeof (CCSSettingInfo));
1887
1888 copyInfo (from->forList.listInfo, to->forList.listInfo, from->forList.listType);
1889 }
18861890
1887 break;1891 break;
1888 }1892 }
@@ -1936,18 +1940,26 @@
1936static void1940static void
1937copySetting (CCSSetting *from, CCSSetting *to)1941copySetting (CCSSetting *from, CCSSetting *to)
1938{1942{
1939 memcpy (to, from, sizeof (CCSSetting));
1940
1941 ccsObjectInit (from, &ccsDefaultObjectAllocator);
1942
1943 /* Allocate a new private ptr for the new setting */1943 /* Allocate a new private ptr for the new setting */
1944 CCSSettingPrivate *ccsPrivate = calloc (1, sizeof (CCSSettingPrivate));1944 CCSSettingPrivate *ccsPrivate = calloc (1, sizeof (CCSSettingPrivate));
19451945
1946 ccsObjectSetPrivate (to, (CCSPrivate *) ccsPrivate);1946 ccsObjectSetPrivate (to, (CCSPrivate *) ccsPrivate);
19471947
1948 unsigned int i = 0;
1949
1950 /* copy interfaces */
1951 for (; i < from->object.n_interfaces; ++i)
1952 ccsObjectAddInterface (to,
1953 from->object.interfaces[i],
1954 from->object.interface_types[i]);
1955
1948 CCSSettingPrivate *fromPrivate = (CCSSettingPrivate *) ccsObjectGetPrivate (from);1956 CCSSettingPrivate *fromPrivate = (CCSSettingPrivate *) ccsObjectGetPrivate (from);
1949 CCSSettingPrivate *toPrivate = (CCSSettingPrivate *) ccsObjectGetPrivate (to);1957 CCSSettingPrivate *toPrivate = (CCSSettingPrivate *) ccsObjectGetPrivate (to);
19501958
1959 /* copy from fromPrivate to toPrivate for now, and replace all
1960 * fields that should be replaced */
1961 memcpy (toPrivate, fromPrivate, sizeof (CCSSettingPrivate));
1962
1951 if (fromPrivate->name)1963 if (fromPrivate->name)
1952 toPrivate->name = strdup (fromPrivate->name);1964 toPrivate->name = strdup (fromPrivate->name);
1953 if (fromPrivate->shortDesc)1965 if (fromPrivate->shortDesc)
@@ -1979,7 +1991,7 @@
1979 toPrivate->defaultValue.parent = to;1991 toPrivate->defaultValue.parent = to;
1980 toPrivate->privatePtr = NULL;1992 toPrivate->privatePtr = NULL;
1981 1993
1982 (to)->object.refcnt = 1;1994 ccsSettingRef (to);
1983}1995}
19841996
1985static void1997static void
@@ -4595,9 +4607,11 @@
4595 {4607 {
4596 CCSSetting *tempSetting = (CCSSetting *) sl->data;4608 CCSSetting *tempSetting = (CCSSetting *) sl->data;
4597 CCSSetting *setting;4609 CCSSetting *setting;
4598 4610 CCSPlugin *plugin = ccsSettingGetParent (tempSetting);
4599 setting = ccsFindSetting (ccsSettingGetParent (tempSetting), ccsSettingGetName (tempSetting));4611 const char *name = ccsSettingGetName (tempSetting);
4600 4612
4613 setting = ccsFindSetting (plugin, name);
4614
4601 if (setting)4615 if (setting)
4602 {4616 {
4603 if (ccsSettingGetType (setting) != TypeList)4617 if (ccsSettingGetType (setting) != TypeList)
@@ -4658,8 +4672,10 @@
4658 {4672 {
4659 CCSSetting *tempSetting = (CCSSetting *) sl->data;4673 CCSSetting *tempSetting = (CCSSetting *) sl->data;
4660 CCSSetting *setting;4674 CCSSetting *setting;
4675 CCSPlugin *plugin = ccsSettingGetParent (tempSetting);
4676 const char *name = ccsSettingGetName (tempSetting);
4661 4677
4662 setting = ccsFindSetting (ccsSettingGetParent (tempSetting), ccsSettingGetName (tempSetting));4678 setting = ccsFindSetting (plugin, name);
4663 4679
4664 if (setting)4680 if (setting)
4665 {4681 {
@@ -4715,8 +4731,10 @@
4715 {4731 {
4716 CCSSetting *tempSetting = (CCSSetting *) sl->data;4732 CCSSetting *tempSetting = (CCSSetting *) sl->data;
4717 CCSSetting *setting;4733 CCSSetting *setting;
4718 4734 CCSPlugin *plugin = ccsSettingGetParent (tempSetting);
4719 setting = ccsFindSetting (ccsSettingGetParent (tempSetting), ccsSettingGetName (tempSetting));4735 const char *name = ccsSettingGetName (tempSetting);
4736
4737 setting = ccsFindSetting (plugin, name);
4720 4738
4721 if (setting)4739 if (setting)
4722 {4740 {
@@ -4760,161 +4778,84 @@
4760static int4778static int
4761upgradeNameFilter (const struct dirent *name)4779upgradeNameFilter (const struct dirent *name)
4762{4780{
4763 int length = strlen (name->d_name);4781 return ccsUpgradeNameFilter (name->d_name);
4764 char *uname, *tok;4782}
47654783
4766 if (length < 7)4784void
4767 return 0;4785ccsFreeUpgrade (CCSSettingsUpgrade *upgrade)
47684786{
4769 uname = tok = strdup (name->d_name);4787 if (upgrade->profile)
47704788 free (upgrade->profile);
4771 /* Keep removing domains and other bits4789
4772 * until we hit a number that we can parse */4790 if (upgrade->domain)
4773 while (tok)4791 free (upgrade->domain);
4774 {4792
4775 long int num = 0;4793 if (upgrade->file)
4776 char *nexttok = strchr (tok, '.') + 1;4794 free (upgrade->file);
4777 char *nextnexttok = strchr (nexttok, '.') + 1;4795
4778 char *end;4796 free (upgrade);
4779 char *bit = strndup (nexttok, strlen (nexttok) - (strlen (nextnexttok) + 1));4797}
4780
4781 /* FIXME: That means that the number can't be a zero */
4782 errno = 0;
4783 num = strtol (bit, &end, 10);
4784
4785 if (!(errno != 0 && num == 0) &&
4786 end != bit)
4787 {
4788 free (bit);
4789
4790 /* Check if the next token after the number
4791 * is .upgrade */
4792
4793 if (strncmp (nextnexttok, "upgrade", 7))
4794 return 0;
4795 break;
4796 }
4797 else if (errno)
4798 perror ("strtol");
4799
4800 tok = nexttok;
4801
4802 free (bit);
4803 }
4804
4805 free (uname);
4806
4807 return 1;
4808}
48094798
4810/*4799/*
4811 * Process a filename into the properties4800 * Process a filename into the properties
4812 * for a settings upgrade4801 * for a settings upgrade
4813 * eg4802 * eg
4814 * 4803 *
4815 * org.freedesktop.compiz.Default.01.upgrade4804 * org.freedesktop.compiz.Default.01.upgrade
4816 * 4805 *
4817 * gives us:4806 * gives us:
4818 * domain: org.freedesktop.compiz4807 * domain: org.freedesktop.compiz
4819 * number: 14808 * number: 1
4820 * profile: Default4809 * profile: Default
4821 * 4810 *
4822 */4811 */
4823CCSSettingsUpgrade *4812CCSSettingsUpgrade *
4824ccsSettingsUpgradeNew (char *path, char *name)4813ccsSettingsUpgradeNew (char *path, const char *name)
4825{4814{
4826 CCSSettingsUpgrade *upgrade = calloc (1, sizeof (CCSSettingsUpgrade));4815 CCSSettingsUpgrade *upgrade = calloc (1, sizeof (CCSSettingsUpgrade));
4827 int length = strlen (name);4816 char *upgradeName = strdup (name);
4828 char *uname, *tok;
4829 unsigned int fnlen = strlen (path) + strlen (name) + 1;4817 unsigned int fnlen = strlen (path) + strlen (name) + 1;
48304818
4831 upgrade->file = calloc (fnlen + 1, sizeof (char));4819 upgrade->file = calloc (fnlen + 1, sizeof (char));
4832 sprintf (upgrade->file, "%s/%s", path, name);4820 sprintf (upgrade->file, "%s/%s", path, name);
48334821
4834 uname = tok = strdup (name);4822 upgradeName = strdup (name);
48354823
4836 /* Keep removing domains and other bits4824 if (!ccsUpgradeGetDomainNumAndProfile (upgradeName,
4837 * until we hit a number that we can parse */4825 &upgrade->domain,
4838 while (tok)4826 &upgrade->num,
4827 &upgrade->profile))
4839 {4828 {
4840 long int num = 0;4829 ccsFreeUpgrade (upgrade);
4841 char *nexttok = strchr (tok, '.') + 1;4830 upgrade = NULL;
4842 char *nextnexttok = strchr (nexttok, '.') + 1;
4843 char *end;
4844 char *bit = strndup (nexttok, strlen (nexttok) - (strlen (nextnexttok) + 1));
4845
4846 /* FIXME: That means that the number can't be a zero */
4847 errno = 0;
4848 num = strtol (bit, &end, 10);
4849
4850 if (!(errno != 0 && num == 0) &&
4851 end != bit)
4852 {
4853 upgrade->domain = strndup (uname, length - (strlen (tok) + 1));
4854 upgrade->num = num;
4855
4856 /* profile.n.upgrade */
4857 upgrade->profile = strndup (tok, strlen (tok) - (strlen (nexttok) + 1));
4858 free (bit);
4859 break;
4860 }
4861 else if (errno)
4862 perror ("strtol");
4863
4864 tok = nexttok;
4865
4866 free (bit);
4867 }4831 }
4868 4832
4869 free (uname);4833 free (upgradeName);
4870 4834
4871 return upgrade;4835 return upgrade;
4872}4836}
48734837
4874Bool4838static FILE *
4875ccsCheckForSettingsUpgradeDefault (CCSContext *context)4839ccsGetDoneSettingsUpgradeFile (const char *home)
4876{4840{
4877 struct dirent **nameList;
4878 int nFile, i;
4879 char *path = DATADIR "/compizconfig/upgrades/";
4880 char *dupath = NULL;4841 char *dupath = NULL;
4881 FILE *completedUpgrades;4842 FILE *completedUpgrades = NULL;
4843
4844 if (asprintf (&dupath, "%s/.config/compiz-1/compizconfig/done_upgrades", home) == -1)
4845 return NULL;
4846
4847 completedUpgrades = fopen (dupath, "a+");
4848 free (dupath);
4849
4850 return completedUpgrades;
4851}
4852
4853static char *
4854ccsReadCompletedUpgradesIntoString (FILE *completedUpgrades)
4855{
4882 char *cuBuffer;4856 char *cuBuffer;
4883 unsigned int cuSize;4857 unsigned int cuSize;
4884 size_t cuReadSize;4858 size_t cuReadSize;
4885 char *home = getenv ("HOME");
4886
4887 if (!home)
4888 return FALSE;
4889
4890 if (asprintf (&dupath, "%s/.config/compiz-1/compizconfig/done_upgrades", home) == -1)
4891 return FALSE;
4892
4893 completedUpgrades = fopen (dupath, "a+");
4894
4895 if (!path)
4896 {
4897 free (dupath);
4898 fclose (completedUpgrades);
4899 return FALSE;
4900 }
4901
4902 nFile = scandir (path, &nameList, upgradeNameFilter, alphasort);
4903 if (nFile <= 0)
4904 {
4905 free (dupath);
4906 fclose (completedUpgrades);
4907 return FALSE;
4908 }
4909
4910 if (!completedUpgrades)
4911 {
4912 free (nameList);
4913 free (dupath);
4914 fclose (completedUpgrades);
4915 ccsWarning ("Error opening done_upgrades");
4916 return FALSE;
4917 }
49184859
4919 fseek (completedUpgrades, 0, SEEK_END);4860 fseek (completedUpgrades, 0, SEEK_END);
4920 cuSize = ftell (completedUpgrades);4861 cuSize = ftell (completedUpgrades);
@@ -4928,38 +4869,118 @@
49284869
4929 cuBuffer[cuSize] = '\0';4870 cuBuffer[cuSize] = '\0';
49304871
4872 return cuBuffer;
4873}
4874
4875static unsigned int
4876ccsGetUpgradeFilesForProcessing (const char *upgradePath,
4877 struct dirent ***passedNameList)
4878{
4879 struct dirent **nameList = NULL;
4880 unsigned int nFile = scandir (upgradePath, &nameList, upgradeNameFilter, alphasort);
4881
4882 if (nFile <= 0)
4883 return 0;
4884
4885 *passedNameList = nameList;
4886
4887 return nFile;
4888}
4889
4890static Bool
4891ccsShouldSkipUpgrade (const char *upgrade,
4892 const char *skipBuffer)
4893{
4894 char *matched = strstr (skipBuffer, upgrade);
4895
4896 if (matched != NULL)
4897 {
4898 ccsDebug ("Skipping upgrade %s", upgrade);
4899 return TRUE;
4900 }
4901
4902 return FALSE;
4903}
4904
4905static void
4906ccsProcessUpgradeOnce (CCSContext *context,
4907 CCSSettingsUpgrade *upgrade,
4908 const char *upgradeName,
4909 FILE *completedUpgrades)
4910{
4911 ccsDebug ("Processing upgrade %s\n profile: %s\n number: %i\n domain: %s",
4912 upgradeName,
4913 upgrade->profile,
4914 upgrade->num,
4915 upgrade->domain);
4916
4917 ccsProcessUpgrade (context, upgrade);
4918 ccsWriteChangedSettings (context);
4919 ccsWriteAutoSortedPluginList (context);
4920 ccsDebug ("Completed upgrade %s", upgradeName);
4921
4922 fprintf (completedUpgrades, "%s\n", upgradeName);
4923 ccsFreeUpgrade (upgrade);
4924}
4925
4926Bool
4927ccsCheckForSettingsUpgradeDefault (CCSContext *context)
4928{
4929 struct dirent **nameList = NULL;
4930 int nFile, i;
4931 char *path = DATADIR "/compizconfig/upgrades/";
4932 FILE *completedUpgrades;
4933 char *cuBuffer = NULL;
4934 char *home = getenv ("HOME");
4935
4936 if (!home)
4937 return FALSE;
4938
4939 completedUpgrades = ccsGetDoneSettingsUpgradeFile (home);
4940
4941 if (!completedUpgrades)
4942 return FALSE;
4943
4944 cuBuffer = ccsReadCompletedUpgradesIntoString (completedUpgrades);
4945
4946 if (!cuBuffer)
4947 {
4948 fclose (completedUpgrades);
4949 ccsWarning ("Error opening done_upgrades");
4950 return FALSE;
4951 }
4952
4953 nFile = ccsGetUpgradeFilesForProcessing (path, &nameList);
4954
4955 if (!nFile || !nameList)
4956 {
4957 free (cuBuffer);
4958 fclose (completedUpgrades);
4959 return FALSE;
4960 }
4961
4931 for (i = 0; i < nFile; i++)4962 for (i = 0; i < nFile; i++)
4932 {4963 {
4933 char *matched = strstr (cuBuffer, nameList[i]->d_name);4964 CCSSettingsUpgrade *upgrade = NULL;
4934 CCSSettingsUpgrade *upgrade;4965 const char *upgradeName = nameList[i]->d_name;
4935 4966
4936 if (matched)4967 if (ccsShouldSkipUpgrade (upgradeName,
4937 {4968 cuBuffer))
4938 ccsDebug ("Skipping upgrade %s", nameList[i]->d_name);
4939 continue;4969 continue;
4940 }4970
49414971 upgrade = ccsSettingsUpgradeNew (path, upgradeName);
4942 upgrade = ccsSettingsUpgradeNew (path, nameList[i]->d_name);4972
4943 4973 ccsProcessUpgradeOnce (context, upgrade, upgradeName, completedUpgrades);
4944 ccsDebug ("Processing upgrade %s\nprofile: %s\nnumber: %i\ndomain: %s", nameList[i]->d_name, upgrade->profile, upgrade->num, upgrade->domain);4974
4945
4946 ccsProcessUpgrade (context, upgrade);
4947 ccsWriteChangedSettings (context);
4948 ccsWriteAutoSortedPluginList (context);
4949 ccsDebug ("Completed upgrade %s", nameList[i]->d_name);
4950 fprintf (completedUpgrades, "%s\n", nameList[i]->d_name);
4951 free (upgrade->profile);
4952 free (upgrade->domain);
4953 free (upgrade->file);
4954 free (upgrade);
4955 free (nameList[i]);4975 free (nameList[i]);
4956 }4976 }
49574977
4958 free (dupath);
4959 fclose (completedUpgrades);4978 fclose (completedUpgrades);
4960 free (cuBuffer);4979 free (cuBuffer);
4961 free (nameList);4980
4962 4981 if (nameList != NULL)
4982 free (nameList);
4983
4963 return TRUE;4984 return TRUE;
4964}4985}
49654986
49664987
=== modified file 'compizconfig/libcompizconfig/tests/CMakeLists.txt'
--- compizconfig/libcompizconfig/tests/CMakeLists.txt 2012-08-16 10:16:42 +0000
+++ compizconfig/libcompizconfig/tests/CMakeLists.txt 2012-09-11 08:44:21 +0000
@@ -2,6 +2,7 @@
2include_directories (${CMAKE_SOURCE_DIR}/include)2include_directories (${CMAKE_SOURCE_DIR}/include)
3include_directories (${CMAKE_SOURCE_DIR}/tests/shared)3include_directories (${CMAKE_SOURCE_DIR}/tests/shared)
4include_directories (${CMAKE_CURRENT_SOURCE_DIR}/../../mocks/libcompizconfig)4include_directories (${CMAKE_CURRENT_SOURCE_DIR}/../../mocks/libcompizconfig)
5include_directories (${CMAKE_CURRENT_SOURCE_DIR}/../src)
5include_directories (${CMAKE_SOURCE_DIR}/compizconfig/tests)6include_directories (${CMAKE_SOURCE_DIR}/compizconfig/tests)
6link_directories (${CMAKE_INSTALL_PREFIX}/lib)7link_directories (${CMAKE_INSTALL_PREFIX}/lib)
7link_directories (${CMAKE_CURRENT_BINARY_DIR}/../../mocks/libcompizconfig)8link_directories (${CMAKE_CURRENT_BINARY_DIR}/../../mocks/libcompizconfig)
@@ -27,6 +28,9 @@
27add_executable (compizconfig_test_ccs_mock_backend_conformance28add_executable (compizconfig_test_ccs_mock_backend_conformance
28 ${CMAKE_CURRENT_SOURCE_DIR}/compizconfig_test_ccs_mock_backend_conformance.cpp)29 ${CMAKE_CURRENT_SOURCE_DIR}/compizconfig_test_ccs_mock_backend_conformance.cpp)
2930
31add_executable (compizconfig_test_ccs_upgrade_internal
32 ${CMAKE_CURRENT_SOURCE_DIR}/compizconfig_test_ccs_settings_upgrade_internal.cpp)
33
30if (HAVE_PROTOBUF)34if (HAVE_PROTOBUF)
31 set (LIBCOMPIZCONFIG_LIBRARIES35 set (LIBCOMPIZCONFIG_LIBRARIES
32 ${LIBCOMPIZCONFIG_LIBRARIES}36 ${LIBCOMPIZCONFIG_LIBRARIES}
@@ -98,8 +102,17 @@
98 compizconfig_ccs_plugin_mock102 compizconfig_ccs_plugin_mock
99 compizconfig_ccs_setting_mock)103 compizconfig_ccs_setting_mock)
100104
105target_link_libraries (compizconfig_test_ccs_upgrade_internal
106 ${GTEST_BOTH_LIBRARIES}
107 ${GMOCK_LIBRARY}
108 ${GMOCK_MAIN_LIBRARY}
109 ${CMAKE_THREAD_LIBS_INIT}
110 ccs_settings_upgrade_internal
111)
112
101compiz_discover_tests (compizconfig_test_ccs_object COVERAGE compizconfig)113compiz_discover_tests (compizconfig_test_ccs_object COVERAGE compizconfig)
102compiz_discover_tests (compizconfig_test_ccs_context COVERAGE compizconfig_ccs_context_mock)114compiz_discover_tests (compizconfig_test_ccs_context COVERAGE compizconfig_ccs_context_mock)
103compiz_discover_tests (compizconfig_test_ccs_plugin COVERAGE compizconfig_ccs_plugin_mock)115compiz_discover_tests (compizconfig_test_ccs_plugin COVERAGE compizconfig_ccs_plugin_mock)
104compiz_discover_tests (compizconfig_test_ccs_setting COVERAGE compizconfig_ccs_setting_mock)116compiz_discover_tests (compizconfig_test_ccs_setting COVERAGE compizconfig_ccs_setting_mock)
105compiz_discover_tests (compizconfig_test_ccs_mock_backend_conformance COVERAGE compizconfig_ccs_backend_mock)117compiz_discover_tests (compizconfig_test_ccs_mock_backend_conformance COVERAGE compizconfig_ccs_backend_mock)
118compiz_discover_tests (compizconfig_test_ccs_upgrade_internal COVERAGE ccs_settings_upgrade_internal)
106119
=== added file 'compizconfig/libcompizconfig/tests/compizconfig_test_ccs_settings_upgrade_internal.cpp'
--- compizconfig/libcompizconfig/tests/compizconfig_test_ccs_settings_upgrade_internal.cpp 1970-01-01 00:00:00 +0000
+++ compizconfig/libcompizconfig/tests/compizconfig_test_ccs_settings_upgrade_internal.cpp 2012-09-11 08:44:21 +0000
@@ -0,0 +1,70 @@
1#include <gtest/gtest.h>
2#include <gmock/gmock.h>
3
4#include "ccs_settings_upgrade_internal.h"
5#include "gtest_shared_characterwrapper.h"
6
7using ::testing::IsNull;
8
9class CCSSettingsUpgradeInternalTest :
10 public ::testing::Test
11{
12};
13
14namespace
15{
16 static const std::string CCS_SETTINGS_UPGRADE_TEST_CORRECT_FILENAME = "org.compiz.general.1.upgrade";
17 static const std::string CCS_SETTINGS_UPGRADE_TEST_INCORRECT_FILENAME = "1.upgra";
18 static const std::string CCS_SETTINGS_UPGRADE_TEST_CORRECT_DOMAIN = "org.compiz";
19 static const std::string CCS_SETTINGS_UPGRADE_TEST_CORRECT_PROFILE = "general";
20 static const unsigned int CCS_SETTINGS_UPGRADE_TEST_CORRECT_NUM = 1;
21}
22
23MATCHER(BoolTrue, "Bool True") { if (arg) return true; else return false; }
24MATCHER(BoolFalse, "Bool False") { if (!arg) return true; else return false; }
25
26TEST_F (CCSSettingsUpgradeInternalTest, TestDetokenizeAndSetValues)
27{
28 char *profileName = NULL;
29 char *domainName = NULL;
30
31 unsigned int num;
32
33 EXPECT_THAT (ccsUpgradeGetDomainNumAndProfile (CCS_SETTINGS_UPGRADE_TEST_CORRECT_FILENAME.c_str (),
34 &domainName,
35 &num,
36 &profileName), BoolTrue ());
37
38 CharacterWrapper profileNameC (profileName);
39 CharacterWrapper domainNameC (domainName);
40
41 EXPECT_EQ (CCS_SETTINGS_UPGRADE_TEST_CORRECT_PROFILE, profileName);
42 EXPECT_EQ (CCS_SETTINGS_UPGRADE_TEST_CORRECT_DOMAIN, domainName);
43 EXPECT_EQ (num, CCS_SETTINGS_UPGRADE_TEST_CORRECT_NUM);
44}
45
46TEST_F (CCSSettingsUpgradeInternalTest, TestDetokenizeAndSetValuesReturnsFalseIfInvalid)
47{
48 char *profileName = NULL;
49 char *domainName = NULL;
50
51 unsigned int num;
52
53 EXPECT_THAT (ccsUpgradeGetDomainNumAndProfile (CCS_SETTINGS_UPGRADE_TEST_INCORRECT_FILENAME.c_str (),
54 &domainName,
55 &num,
56 &profileName), BoolFalse ());
57
58 EXPECT_THAT (profileName, IsNull ());
59 EXPECT_THAT (domainName, IsNull ());
60}
61
62TEST_F (CCSSettingsUpgradeInternalTest, TestDetokenizeAndReturnTrueForUpgradeFileName)
63{
64 EXPECT_THAT (ccsUpgradeNameFilter (CCS_SETTINGS_UPGRADE_TEST_CORRECT_FILENAME.c_str ()), BoolTrue ());
65}
66
67TEST_F (CCSSettingsUpgradeInternalTest, TestDetokenizeAndReturnFalseForNoUpgradeFileName)
68{
69 EXPECT_THAT (ccsUpgradeNameFilter (CCS_SETTINGS_UPGRADE_TEST_CORRECT_FILENAME.c_str ()), BoolTrue ());
70}
071
=== modified file 'debian/changelog'
--- debian/changelog 2012-09-07 11:25:34 +0000
+++ debian/changelog 2012-09-11 08:44:21 +0000
@@ -1,9 +1,68 @@
1compiz (1:0.9.8.0-0ubuntu2) UNRELEASED; urgency=low1compiz (1:0.9.8.2-0ubuntu1) UNRELEASED; urgency=low
22
3 [ Sam Spilsbury ]
3 * debian/python-compizconfig.install4 * debian/python-compizconfig.install
4 - Install compizconfig-python.pc5 - Install compizconfig-python.pc
56 * debian/patches/100_expo_layout.patch
6 -- Sam Spilsbury <sam.spilsbury@canonical.com> Fri, 07 Sep 2012 17:08:53 +08007 - re-add the expo layout that used to be in precise (LP: #1047067)
8 - add some testcases
9
10 [ Timo Jyrinki ]
11 * New upstream release.
12 - Fix multiple window placement bugs (LP: #974242) (LP: #976032)
13 - Don't waste CPU looping through and looking at all the windows if you're
14 rendering an output that has no damage on it. (LP: #1014986)
15 - Updated convert files to fix some typos in the key names. (LP: #1041631)
16 - Fix crash when imgsvg is loaded, due to missing symbol
17 (decor_apply_gravity from libdecoration). (LP: #956986)
18 - Treat unresolved symbols at link time as an error, rather than letting
19 them through and cause strange crashes later. (LP: #1043143)
20 - Refactors a little bit of the upgrade code and gets it under test to
21 prepare to fix (LP: #1042537)
22 - Updated AUTHORS from the full bzr log, and re-sort the list.
23 (LP: #1042095)
24 - Fixes FTBFS for kde4-window-decorator (LP: #1041310)
25 - Fix obvious omissions from the introduction of unminimize_*,
26 which were causing the unminimize animation settings to be ignored
27 (LP: #1040455)
28 - resize plugin: don't crash if resize wasn't initiated externally
29 (LP: #1045191)
30 - Clean up capitalization (LP: #1045652)
31 - Avoid division by zero, if plugins try to deform a window down to size
32 zero. (LP: #1045235)
33 - Make "Unredirect Fullscreen Windows" more reliable. This fixes the
34 problem with unredirection failing to engage at all (LP: #1041066) when
35 gtk-window-decorator creates offscreen windows that are stacked on top.
36 This also fixes the problem with unredirect hiding all windows,
37 because it thinks the desktop window should be stacked on top
38 (LP: #980663).
39 - Ensure unredirected windows don't stay unredirected if they're no longer
40 on top. (LP: #1041047)
41 - Fix launching terminal functionality and make show-hud default key
42 visible. Update the defaults to org.compiz.integrated to reflect the
43 actual gnome values pre-gnome-3. (LP: #1040081) (LP: #1046199)
44 (LP: #1046190)
45 - Fix show-hud, bump COMPIZ_GNOME_INTEGRATED_SETTINGS_LIST_SIZE.
46 (LP: #1046212)
47 - Fixed: Windows with an alpha-channel, like gnome-terminal, were not
48 being considered as possibly covering fullscreen windows. But they most
49 certainly can. This ensures such RGBA windows are visible if they're
50 stacked above a fullscreen window. (LP: #1046661)
51 - Remove ListToStringList (LP: #1046184)
52 - Fix typo causing CMake Error (LP: #1045665)
53 - Transitions gtk-window-decorator over to use GSettings. Add a testing
54 framework for the options code. (LP: #1042323)
55 - Also need kdeworkspace since kdecorationbridge.h is there
56 (LP: #1046770)
57 - Implements some cleanup that was suggested on the merge for the original
58 port to gsettings (LP: #1042323)
59 * debian/compiz-dev.install
60 - Remove compizconfig-python.pc, now in python-compizconfig.install
61 * Cherry-pick fix from upstream:
62 - Migrate profile independent keys separately from the profile
63 dependent keys (LP: #1046190)
64
65 -- Timo Jyrinki <timo-jyrinki@ubuntu.com> Mon, 10 Sep 2012 15:27:32 +0300
766
8compiz (1:0.9.8.0-0ubuntu1) quantal-proposed; urgency=low67compiz (1:0.9.8.0-0ubuntu1) quantal-proposed; urgency=low
968
1069
=== modified file 'debian/compiz-dev.install'
--- debian/compiz-dev.install 2012-08-24 13:41:00 +0000
+++ debian/compiz-dev.install 2012-09-11 08:44:21 +0000
@@ -1,6 +1,14 @@
1debian/tmp/usr/include/compiz/[!d]*1debian/tmp/usr/include/compiz/[!d]*
2debian/tmp/usr/lib/libcompiz_core.so2debian/tmp/usr/lib/libcompiz_core.so
3debian/tmp/usr/lib/pkgconfig/[!l]*3debian/tmp/usr/lib/pkgconfig/compiz-animation.pc
4debian/tmp/usr/lib/pkgconfig/compiz-compiztoolbox.pc
5debian/tmp/usr/lib/pkgconfig/compiz-composite.pc
6debian/tmp/usr/lib/pkgconfig/compiz-cube.pc
7debian/tmp/usr/lib/pkgconfig/compiz-mousepoll.pc
8debian/tmp/usr/lib/pkgconfig/compiz-opengl.pc
9debian/tmp/usr/lib/pkgconfig/compiz.pc
10debian/tmp/usr/lib/pkgconfig/compiz-scale.pc
11debian/tmp/usr/lib/pkgconfig/compiz-text.pc
4debian/tmp/usr/share/compiz/xslt12debian/tmp/usr/share/compiz/xslt
5debian/tmp/usr/share/cmake*/FindCompiz.cmake13debian/tmp/usr/share/cmake*/FindCompiz.cmake
6debian/tmp/usr/share/cmake*/Modules/FindCompiz.cmake14debian/tmp/usr/share/cmake*/Modules/FindCompiz.cmake
715
=== modified file 'debian/compiz-gnome.migrations'
--- debian/compiz-gnome.migrations 2012-08-17 08:50:20 +0000
+++ debian/compiz-gnome.migrations 2012-09-11 08:44:21 +0000
@@ -1,1 +1,2 @@
1postinst/migration-scripts/02_migrate_to_gsettings.py1postinst/migration-scripts/02_migrate_to_gsettings.py
2postinst/migration-scripts/03_migrate_profile_independent.py
23
=== added file 'debian/patches/100_expo_layout.patch'
--- debian/patches/100_expo_layout.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/100_expo_layout.patch 2012-09-11 08:44:21 +0000
@@ -0,0 +1,2903 @@
1Index: ubuntu/plugins/expo/expo.xml.in
2===================================================================
3--- ubuntu.orig/plugins/expo/expo.xml.in 2012-09-08 11:51:32.971327571 +0800
4+++ ubuntu/plugins/expo/expo.xml.in 2012-09-08 11:51:33.103328227 +0800
5@@ -17,6 +17,7 @@
6 <plugin>wobbly</plugin>
7 <plugin>animation</plugin>
8 <plugin>wallpaper</plugin>
9+ <plugin>imgpng</plugin>
10 </relation>
11 </deps>
12 <options>
13@@ -25,7 +26,7 @@
14 <option name="expo_key" type="key">
15 <_short>Expo key</_short>
16 <_long>Engage wall expo mode key binding</_long>
17- <default>&lt;Super&gt;e</default>
18+ <default>&lt;Super&gt;s</default>
19 </option>
20 <option name="expo_button" type="button">
21 <_short>Expo button</_short>
22@@ -35,8 +36,6 @@
23 <option name="expo_edge" type="edge">
24 <_short>Expo edge</_short>
25 <_long>Engage wall expo mode edge binding</_long>
26- <default>
27- </default>
28 </option>
29 <option name="double_click_time" type="int">
30 <_short>Double click time</_short>
31@@ -79,7 +78,7 @@
32 <option name="zoom_time" type="float">
33 <_short>Zoom time</_short>
34 <_long>Duration of the zoomout animation</_long>
35- <default>0.5</default>
36+ <default>0.3</default>
37 <min>0.1</min>
38 <max>5.0</max>
39 <precision>0.1</precision>
40@@ -130,10 +129,24 @@
41 <_name>Curve</_name>
42 </desc>
43 </option>
44+ <option name="x_offset" type="int">
45+ <_short>X Space</_short>
46+ <_long> Left Side screen space of expo in pixels</_long>
47+ <min>-1680</min>
48+ <max>1680</max>
49+ <default>64</default>
50+ </option>
51+ <option name="y_offset" type="int">
52+ <_short>Y Space</_short>
53+ <_long> Top Side screen space of expo in pixels</_long>
54+ <min>-100</min>
55+ <max>100</max>
56+ <default>24</default>
57+ </option>
58 <option name="distance" type="float">
59 <_short>Distance</_short>
60 <_long>Distance of the expo wall</_long>
61- <default>0.0</default>
62+ <default>0.005</default>
63 <min>0.0</min>
64 <max>1.0</max>
65 <precision>0.01</precision>
66@@ -141,7 +154,7 @@
67 <option name="vp_distance" type="float">
68 <_short>Viewport distance</_short>
69 <_long>Distance between viewports</_long>
70- <default>0.10</default>
71+ <default>0.2</default>
72 <min>0.0</min>
73 <max>1.0</max>
74 <precision>0.01</precision>
75@@ -192,7 +205,7 @@
76 <option name="vp_brightness" type="float">
77 <_short>Brightness</_short>
78 <_long>Inactive viewport brightness.</_long>
79- <default>75.0</default>
80+ <default>40.0</default>
81 <min>0.0</min>
82 <max>100.0</max>
83 <precision>0.1</precision>
84@@ -200,18 +213,28 @@
85 <option name="vp_saturation" type="float">
86 <_short>Saturation</_short>
87 <_long>Inactive viewport saturation.</_long>
88- <default>100.0</default>
89+ <default>40.0</default>
90 <min>0.0</min>
91 <max>100.0</max>
92 <precision>0.1</precision>
93 </option>
94+ <option name="selected_color" type="color">
95+ <_short>Selected Color</_short>
96+ <_long>Color to use when highlighting the selected viewport</_long>
97+ <default>
98+ <red>0xfbfb</red>
99+ <green>0x8b8b</green>
100+ <blue>0x0</blue>
101+ <alpha>0xffff</alpha>
102+ </default>
103+ </option>
104 </subgroup>
105 <subgroup>
106 <short>Reflection</short>
107 <option name="reflection" type="bool">
108 <_short>Reflection</_short>
109 <_long>Show a reflection of the viewports on the ground</_long>
110- <default>true</default>
111+ <default>false</default>
112 </option>
113 <option name="ground_color1" type="color">
114 <_short>Ground color(near)</_short>
115@@ -244,7 +267,7 @@
116 <option name="scale_factor" type="float">
117 <_short>Reflection Scale</_short>
118 <_long>Scale factor of the expo wall reflection</_long>
119- <default>0.75</default>
120+ <default>1.0</default>
121 <min>0.0</min>
122 <max>2.0</max>
123 <precision>0.01</precision>
124Index: ubuntu/plugins/expo/src/expo.cpp
125===================================================================
126--- ubuntu.orig/plugins/expo/src/expo.cpp 2012-09-08 11:51:02.279175377 +0800
127+++ ubuntu/plugins/expo/src/expo.cpp 2012-09-08 15:18:15.744829608 +0800
128@@ -27,6 +27,8 @@
129
130 #include "expo.h"
131 #include "click-threshold.h"
132+#include "wall-offset.h"
133+#include "windows-on-viewport.h"
134 #include <math.h>
135 #ifndef USE_GLES
136 #include <GL/glu.h>
137@@ -73,11 +75,10 @@
138
139 if (dndState == DnDDuring || dndState == DnDStart)
140 {
141- if (dndWindow)
142+ if (dndWindows.size ())
143 finishWindowMovement ();
144
145 dndState = DnDNone;
146- dndWindow = NULL;
147
148 action->setState (action->state () & CompAction::StateInitButton);
149 cScreen->damageScreen ();
150@@ -113,7 +114,6 @@
151 clickTime = 0;
152
153 dndState = DnDNone;
154- dndWindow = NULL;
155
156 selectedVp = screen->vp ();
157 lastSelectedVp = screen->vp ();
158@@ -156,8 +156,8 @@
159 else
160 vpUpdateMode = VPUpdateMouseOver;
161
162- dndState = DnDNone;
163- dndWindow = NULL;
164+ dndState = DnDNone;
165+ dndWindows.clear ();
166
167 screen->removeAction (&optionGetDndButton ());
168 screen->removeAction (&optionGetExitButton ());
169@@ -202,6 +202,8 @@
170 if (!expoMode)
171 return false;
172
173+ lastSelectedVp = selectedVp;
174+
175 newX = selectedVp.x () + 1;
176 newY = selectedVp.y ();
177
178@@ -225,7 +227,7 @@
179 CompAction::State state,
180 CompOption::Vector& options)
181 {
182- int newX, newY;
183+ unsigned int newX, newY;
184 Window xid = CompOption::getIntOptionNamed (options, "root", 0);
185 if (xid != screen->root ())
186 return false;
187@@ -272,53 +274,39 @@
188 void
189 ExpoScreen::finishWindowMovement ()
190 {
191- dndWindow->syncPosition ();
192- dndWindow->ungrabNotify ();
193-
194- screen->moveViewport (screen->vp ().x () - selectedVp.x (),
195- screen->vp ().y () - selectedVp.y (), true);
196-
197- /* update saved window attributes in case we moved the
198- window to a new viewport */
199- if (dndWindow->saveMask () & CWX)
200- {
201- dndWindow->saveWc ().x = dndWindow->saveWc ().x % screen->width ();
202- if (dndWindow->saveWc ().x < 0)
203- dndWindow->saveWc ().x += screen->width ();
204- }
205- if (dndWindow->saveMask () & CWY)
206+ foreach (CompWindow *dndWindow, dndWindows)
207 {
208- dndWindow->saveWc ().y = dndWindow->saveWc ().y % screen->height ();
209- if (dndWindow->saveWc ().y < 0)
210- dndWindow->saveWc ().y += screen->height ();
211- }
212-
213- /* update window attibutes to make sure a moved maximized window
214- is properly snapped to the work area */
215- if (dndWindow->state () & MAXIMIZE_STATE)
216- dndWindow->updateAttributes (CompStackingUpdateModeNone);
217-
218-#if 0 /* FIXME: obsolete in the meantime? */
219- {
220- int lastOutput;
221- int centerX, centerY;
222+ if (dndWindow->grabbed ())
223+ {
224+ dndWindow->syncPosition ();
225+ dndWindow->ungrabNotify ();
226
227- /* make sure we snap to the correct output */
228- lastOutput = s->currentOutputDev;
229- centerX = (WIN_X (w) + WIN_W (w) / 2) % s->width;
230- if (centerX < 0)
231- centerX += s->width;
232- centerY = (WIN_Y (w) + WIN_H (w) / 2) % s->height;
233- if (centerY < 0)
234- centerY += s->height;
235+ screen->updateGrab (grabIndex, None);
236
237- s->currentOutputDev = outputDeviceForPoint (s, centerX, centerY);
238+ screen->moveViewport (screen->vp ().x () - selectedVp.x (),
239+ screen->vp ().y () - selectedVp.y (), true);
240
241- updateWindowAttributes (w, CompStackingUpdateModeNone);
242+ /* update saved window attributes in case we moved the
243+ window to a new viewport */
244+ if (dndWindow->saveMask () & CWX)
245+ {
246+ dndWindow->saveWc ().x = dndWindow->saveWc ().x % screen->width ();
247+ if (dndWindow->saveWc ().x < 0)
248+ dndWindow->saveWc ().x += screen->width ();
249+ }
250+ if (dndWindow->saveMask () & CWY)
251+ {
252+ dndWindow->saveWc ().y = dndWindow->saveWc ().y % screen->height ();
253+ if (dndWindow->saveWc ().y < 0)
254+ dndWindow->saveWc ().y += screen->height ();
255+ }
256
257- s->currentOutputDev = lastOutput;
258+ /* update window attibutes to make sure a moved maximized window
259+ is properly snapped to the work area */
260+ if (dndWindow->state () & MAXIMIZE_STATE)
261+ dndWindow->updateAttributes (CompStackingUpdateModeNone);
262+ }
263 }
264-#endif
265 }
266
267 void
268@@ -402,6 +390,80 @@
269 screen->handleEvent (event);
270 }
271
272+bool
273+ExpoWindow::dragged () const
274+{
275+ ExpoScreen *es = ExpoScreen::get (screen);
276+
277+ return std::find (es->dndWindows.begin (), es->dndWindows.end (), window) != es->dndWindows.end ();
278+}
279+
280+const compiz::window::Geometry &
281+ExpoWindow::absoluteGeometry () const
282+{
283+ const compiz::window::Geometry &relativeGeometry (window->geometry ());
284+ mAbsoluteGeometry.set ((screen->vp ().x () * screen->width ()) + relativeGeometry.x (),
285+ (screen->vp ().y () * screen->height ()) + relativeGeometry.y (),
286+ relativeGeometry.width (),
287+ relativeGeometry.height (),
288+ relativeGeometry.border ());
289+
290+ return mAbsoluteGeometry;
291+}
292+
293+bool
294+ExpoWindow::isDesktopOrDock () const
295+{
296+ return window->type () == CompWindowTypeDesktopMask ||
297+ window->type () == CompWindowTypeDockMask;
298+}
299+
300+namespace cei = compiz::expo::impl;
301+
302+cei::CompizClientListGenerator::CompizClientListGenerator (CompScreen *screen) :
303+ mScreen (screen),
304+ mClientList (&mScreen->clientList (true)),
305+ mClientListIterator (mClientList->begin ())
306+{
307+}
308+
309+compiz::expo::ViewportMemberWindow *
310+cei::CompizClientListGenerator::nextClient ()
311+{
312+ if (mClientListIterator == mClientList->end ())
313+ return NULL;
314+
315+ compiz::expo::ViewportMemberWindow *vpMemberWindow = ExpoWindow::get (*mClientListIterator);
316+
317+ ++mClientListIterator;
318+
319+ return vpMemberWindow;
320+}
321+
322+bool
323+ExpoScreen::windowsOnVp (compiz::expo::ClientListGenerator &clientList,
324+ CompPoint &p,
325+ const CompPoint &unprojectedCursor,
326+ const CompSize &screenSize,
327+ CompScreen *screen)
328+{
329+ return false;
330+}
331+
332+namespace
333+{
334+ void fillInNewViewportActivityData (unsigned int vpCount,
335+ std::vector <float> &vpActivity)
336+ {
337+ if (vpActivity.size () < vpCount)
338+ {
339+ vpActivity.resize (vpCount);
340+ foreach (float& activity, vpActivity)
341+ activity = 1.0f;
342+ }
343+ }
344+}
345+
346 void
347 ExpoScreen::preparePaint (int msSinceLastPaint)
348 {
349@@ -412,33 +474,42 @@
350 else
351 expoCam = MAX (0.0, expoCam - val);
352
353- if (expoCam)
354+ if (dndState == DnDDuring)
355 {
356- unsigned int i, j, vp;
357- unsigned int vpCount = screen->vpSize ().width () *
358- screen->vpSize ().height ();
359+ foreach (CompWindow *w, dndWindows)
360+ ExpoWindow::get (w)->dndOpacity = MIN (1.0, ExpoWindow::get (w)->dndOpacity + val);
361+ }
362+ else if (dndState == DnDNone)
363+ {
364+ CompWindowList::iterator it = dndWindows.begin ();
365
366- if (vpActivity.size () < vpCount)
367+ while (it != dndWindows.end ())
368 {
369- vpActivity.resize (vpCount);
370- foreach (float& activity, vpActivity)
371- activity = 1.0f;
372- }
373+ ExpoWindow::get ((*it))->dndOpacity = MAX (0.0, ExpoWindow::get ((*it))->dndOpacity - val);
374
375- for (i = 0; i < (unsigned int) screen->vpSize ().width (); i++)
376- {
377- for (j = 0; j < (unsigned int) screen->vpSize ().height (); j++)
378+ if (ExpoWindow::get ((*it))->dndOpacity <= 0.0f)
379 {
380- vp = (j * screen->vpSize ().width ()) + i;
381-
382- if (CompPoint (i, j) == selectedVp)
383- vpActivity[vp] = MIN (1.0, vpActivity[vp] + val);
384- else
385- vpActivity[vp] = MAX (0.0, vpActivity[vp] - val);
386+ dndWindows.erase (it);
387+ it = dndWindows.begin ();
388 }
389+ else
390+ it++;
391 }
392+ }
393
394- for (i = 0; i < 360; i++)
395+ if (expoCam)
396+ {
397+ unsigned int vpCount = compiz::expo::countViewports (screen->vpSize ());
398+
399+ fillInNewViewportActivityData (vpCount, vpActivity);
400+
401+ for (unsigned int i = 0; i < vpCount; i++)
402+ if (vpActive[i])
403+ vpActivity[i] = MIN (1.0, vpActivity[i] + val);
404+ else
405+ vpActivity[i] = MAX (0.0, vpActivity[i] - val);
406+
407+ for (int i = 0; i < 360; i++)
408 {
409 float fi = (float) i;
410
411@@ -509,6 +580,31 @@
412 cScreen->paint (outputs, mask);
413 }
414
415+namespace
416+{
417+ void updateViewportActiveStates (CompScreen *screen)
418+ {
419+ ExpoScreen *es = ExpoScreen::get (screen);
420+
421+ unsigned int vpCount = compiz::expo::countViewports (screen->vpSize ());
422+ fillInNewViewportActivityData (vpCount, es->vpActivity);
423+
424+ for (int i = 0; i < screen->vpSize ().width (); i++)
425+ {
426+ for (int j = 0; j < screen->vpSize ().height (); j++)
427+ {
428+ compiz::expo::impl::CompizClientListGenerator clientList (screen);
429+
430+ compiz::expo::activeViewportsForMembers (clientList,
431+ es->newCursor,
432+ screen->vpSize (),
433+ *screen,
434+ es->vpActive);
435+ }
436+ }
437+ }
438+}
439+
440 void
441 ExpoScreen::donePaint ()
442 {
443@@ -539,6 +635,11 @@
444 foreach (float& vp, vpActivity)
445 if (vp != 0.0 && vp != 1.0)
446 cScreen->damageScreen ();
447+
448+ foreach (CompWindow *w, dndWindows)
449+ if (ExpoWindow::get (w)->dndOpacity != 0.0f &&
450+ ExpoWindow::get (w)->dndOpacity != 1.0f)
451+ cScreen->damageScreen ();
452 }
453
454 if (grabIndex && expoCam <= 0.0f && !expoMode)
455@@ -553,10 +654,25 @@
456 switch (dndState) {
457 case DnDDuring:
458 {
459- if (dndWindow)
460- dndWindow->move (newCursor.x () - prevCursor.x (),
461- newCursor.y () - prevCursor.y (),
462- optionGetExpoImmediateMove ());
463+ if (dndWindows.size ())
464+ {
465+ foreach (CompWindow *dndWindow, dndWindows)
466+ {
467+ if (dndWindow->grabbed ())
468+ {
469+ ExpoWindow *ew = ExpoWindow::get (dndWindow);
470+
471+ /* No need to update twice */
472+ dndWindow->moveNotifySetEnabled (ew, false);
473+ dndWindow->move (newCursor.x () - prevCursor.x (),
474+ newCursor.y () - prevCursor.y (),
475+ optionGetExpoImmediateMove ());
476+ dndWindow->moveNotifySetEnabled (ew, true);
477+
478+ updateViewportActiveStates (screen);
479+ }
480+ }
481+ }
482
483 prevCursor = newCursor;
484 cScreen->damageScreen ();
485@@ -621,13 +737,13 @@
486 break;
487
488 dndState = DnDDuring;
489- dndWindow = w;
490+ dndWindows.push_back (w);
491
492 w->grabNotify (nx, ny, 0,
493 CompWindowGrabMoveMask |
494 CompWindowGrabButtonMask);
495
496- screen->updateGrab (grabIndex, dragCursor);
497+ screen->updateGrab (grabIndex, mMoveCursor);
498
499 w->raise ();
500 w->moveInputFocusTo ();
501@@ -762,6 +878,124 @@
502 }
503
504 void
505+ExpoScreen::paintViewport (const GLScreenPaintAttrib& attrib,
506+ const GLMatrix& transform,
507+ const CompRegion& region,
508+ CompOutput *output,
509+ unsigned int mask,
510+ CompPoint vpPos,
511+ GLVector &vpCamPos,
512+ bool reflection)
513+{
514+ GLMatrix sTransform (transform);
515+ GLMatrix sTransform2, sTransform3;
516+ float sx = (float) screen->width () / output->width ();
517+ float sy = (float) screen->height () / output->height ();
518+ float vpp;
519+ float progress = sigmoidProgress (expoCam);
520+ unsigned int vp;
521+ CompPoint vpSize (screen->vpSize ().width (), screen->vpSize ().height ());
522+
523+ const float gapY = optionGetVpDistance () * 0.1f * expoCam;
524+ const float gapX = optionGetVpDistance () * 0.1f * screen->height () /
525+ screen->width () * expoCam;
526+
527+ /* not sure this will work with different resolutions */
528+ sTransform.translate (0.0, MAX (0, vpPos.y ()) * -(sy + gapY), 0.0f);
529+
530+ sTransform2 = sTransform;
531+
532+ /* not sure this will work with different resolutions */
533+ if (optionGetDeform () != DeformCurve)
534+ sTransform2.translate (MAX (0, vpPos.x ()) * (sx + gapX), 0.0f, 0.0);
535+
536+
537+ if (optionGetExpoAnimation () == ExpoAnimationVortex)
538+ sTransform2.rotate (360 * expoCam,
539+ 0.0f, 1.0f, 2.0f * expoCam);
540+
541+ sTransform3 = sTransform2;
542+
543+ sTransform3.translate (output->x () / output->width (),
544+ -output->y () / output->height (), 0.0);
545+
546+ cScreen->setWindowPaintOffset ((screen->vp ().x () - vpPos.x ()) *
547+ screen->width (),
548+ (screen->vp ().y () - vpPos.y ()) *
549+ screen->height ());
550+
551+ vp = (vpPos.y () * vpSize.x ()) + vpPos.x ();
552+
553+ vpp = (expoCam * vpActivity[vp]) + (1 - expoCam);
554+ vpp = sigmoidProgress (vpp);
555+
556+ vpBrightness = vpp + ((1.0 - vpp) *
557+ optionGetVpBrightness () / 100.0);
558+ vpSaturation = vpp + ((1.0 - vpp) *
559+ optionGetVpSaturation () / 100.0);
560+
561+ paintingVp = vpPos;
562+
563+ if (optionGetDeform () == DeformCurve)
564+ {
565+ float rotateX;
566+
567+ sTransform3.translate (-vpCamPos[GLVector::x], 0.0f,
568+ curveDistance - DEFAULT_Z_CAMERA);
569+
570+ rotateX = -vpPos.x () + interpolate (((float) vpSize.x () / 2.0) - 0.5,
571+ screen->vp ().x (), progress);
572+
573+ sTransform3.rotate (curveAngle * rotateX, 0.0, 1.0, 0.0);
574+
575+ sTransform3.translate (vpCamPos[GLVector::x], 0.0f,
576+ DEFAULT_Z_CAMERA - curveDistance);
577+ }
578+
579+ if (paintingDndWindow)
580+ cScreen->getWindowPaintListSetEnabled (this, true);
581+ gScreen->glPaintTransformedOutput (attrib, sTransform3,
582+ screen->region (), output,
583+ mask);
584+
585+ if (paintingDndWindow)
586+ cScreen->getWindowPaintListSetEnabled (this, false);
587+
588+ if (!reflection && !paintingDndWindow)
589+ {
590+ int cursor[2] = { pointerX, pointerY };
591+
592+ invertTransformedVertex (attrib, sTransform3,
593+ output, cursor);
594+
595+ if ((cursor[0] > 0) && (cursor[0] < (int) screen->width ()) &&
596+ (cursor[1] > 0) && (cursor[1] < (int) screen->height ()))
597+ {
598+ newCursor.setX (vpPos.x () * screen->width () + cursor[0]);
599+ newCursor.setY (vpPos.y () * screen->height () + cursor[1]);
600+
601+ if (anyClick || dndState != DnDNone)
602+ {
603+ /* Used to save last viewport interaction was in */
604+ selectedVp = vpPos;
605+ anyClick = false;
606+ }
607+ }
608+ }
609+
610+ /* Calculate the current viewport size */
611+ int tl[2] = { 0, 0 };
612+ int br[2] = { screen->width (), screen->height () };
613+
614+ invertTransformedVertex (attrib, sTransform3, output, tl);
615+ invertTransformedVertex (attrib, sTransform3, output, br);
616+
617+ viewport_size = CompSize (br[0] - tl[0], br[1] - tl[1]);
618+
619+ cScreen->setWindowPaintOffset (0, 0);
620+}
621+
622+void
623 ExpoScreen::paintWall (const GLScreenPaintAttrib& attrib,
624 const GLMatrix& transform,
625 const CompRegion& region,
626@@ -772,13 +1006,11 @@
627 GLfloat vertexData[12];
628 GLushort colorData[16];
629 GLMatrix sTransformW, sTransform (transform);
630- int i, j, vp;
631 GLenum oldFilter = gScreen->textureFilter ();
632-
633- float sx = (float) screen->width () / output->width ();
634- float sy = (float) screen->height () / output->height ();
635+ float sx = (float) screen->width () / output->width ();
636+ float sy = (float) screen->height () / output->height ();
637 float biasZ;
638- float oScale, rotation = 0.0f, progress, vpp;
639+ float oScale, rotation = 0.0f, progress;
640 float aspectX = 1.0f, aspectY = 1.0f;
641 GLVector cam;
642 CompPoint vpSize (screen->vpSize ().width (), screen->vpSize ().height ());
643@@ -910,9 +1142,24 @@
644 sTransform.rotate (rotation, 0.0f, 1.0f, 0.0f);
645 sTransform.scale (aspectX, aspectY, 1.0);
646
647+ CompPoint offsetInScreenCoords (optionGetXOffset (),
648+ optionGetYOffset ());
649+ float offsetInWorldCoordX, offsetInWorldCoordY, worldScaleFactorX, worldScaleFactorY;
650+
651+ compiz::expo::calculateWallOffset (*output,
652+ offsetInScreenCoords,
653+ vpSize,
654+ *screen,
655+ offsetInWorldCoordX,
656+ offsetInWorldCoordY,
657+ worldScaleFactorX,
658+ worldScaleFactorY,
659+ sigmoidProgress (expoCam));
660+
661 /* translate expo to center */
662- sTransform.translate (vpSize.x () * sx * -0.5,
663- vpSize.y () * sy * 0.5, 0.0f);
664+ sTransform.translate (vpSize.x () * sx * -0.5 + offsetInWorldCoordX,
665+ vpSize.y () * sy * 0.5 - offsetInWorldCoordY, 0.0f);
666+ sTransform.scale (worldScaleFactorX, worldScaleFactorY, 1.0f);
667
668 if (optionGetDeform () == DeformCurve)
669 sTransform.translate ((vpSize.x () - 1) * sx * 0.5, 0.0, 0.0);
670@@ -936,90 +1183,29 @@
671
672 expoActive = true;
673
674- for (j = 0; j < vpSize.y (); j++)
675- {
676- GLMatrix sTransform2 (sTransform), sTransform3;
677-
678- for (i = 0; i < vpSize.x (); i++)
679- {
680- if (optionGetExpoAnimation () == ExpoAnimationVortex)
681- sTransform2.rotate (360 * expoCam,
682- 0.0f, 1.0f, 2.0f * expoCam);
683-
684- sTransform3 = sTransform2;
685-
686- sTransform3.translate (output->x () / output->width (),
687- -output->y () / output->height (), 0.0);
688-
689- cScreen->setWindowPaintOffset ((screen->vp ().x () - i) *
690- screen->width (),
691- (screen->vp ().y () - j) *
692- screen->height ());
693-
694- vp = (j * vpSize.x ()) + i;
695-
696- vpp = (expoCam * vpActivity[vp]) + (1 - expoCam);
697- vpp = sigmoidProgress (vpp);
698-
699- vpBrightness = vpp + ((1.0 - vpp) *
700- optionGetVpBrightness () / 100.0);
701- vpSaturation = vpp + ((1.0 - vpp) *
702- optionGetVpSaturation () / 100.0);
703+ for (int j = 0; j < screen->vpSize ().height (); j++)
704+ for (int i = 0; i < screen->vpSize().width (); i++)
705+ paintViewport (attrib, sTransform, region, output, mask, CompPoint (i, j), vpCamPos, reflection);
706
707- paintingVp.set (i, j);
708+ paintingDndWindow = true;
709
710- if (optionGetDeform () == DeformCurve)
711- {
712- float rotateX;
713-
714- sTransform3.translate (-vpCamPos[GLVector::x], 0.0f,
715- curveDistance - DEFAULT_Z_CAMERA);
716-
717- rotateX = -i + interpolate (((float) vpSize.x () / 2.0) - 0.5,
718- screen->vp ().x (), progress);
719-
720- sTransform3.rotate (curveAngle * rotateX, 0.0, 1.0, 0.0);
721-
722- sTransform3.translate (vpCamPos[GLVector::x], 0.0f,
723- DEFAULT_Z_CAMERA - curveDistance);
724- }
725-
726- gScreen->glPaintTransformedOutput (attrib, sTransform3,
727- screen->region (), output,
728- mask);
729-
730- if (!reflection)
731- {
732- int cursor[2] = { pointerX, pointerY };
733+ foreach (CompWindow *dndWindow, dndWindows)
734+ {
735+ CompPoint vp;
736
737- invertTransformedVertex (attrib, sTransform3,
738- output, cursor);
739+ screen->viewportForGeometry (dndWindow->geometry (), vp);
740
741- if ((cursor[0] > 0) && (cursor[0] < (int) screen->width ()) &&
742- (cursor[1] > 0) && (cursor[1] < (int) screen->height ()))
743- {
744- newCursor.setX (i * screen->width () + cursor[0]);
745- newCursor.setY (j * screen->height () + cursor[1]);
746+ while (vp.x () < 0)
747+ vp.setX (screen->vpSize ().width () + vp.x ());
748
749- if (anyClick || dndState != DnDNone)
750- {
751- /* Used to save last viewport interaction was in */
752- lastSelectedVp = selectedVp;
753- selectedVp.set (i, j);
754- anyClick = false;
755- }
756- }
757- }
758+ while (vp.y () < 0)
759+ vp.setY (screen->vpSize ().height () + vp.y ());
760
761- /* not sure this will work with different resolutions */
762- if (optionGetDeform () != DeformCurve)
763- sTransform2.translate (sx + gapX, 0.0f, 0.0);
764- }
765-
766- /* not sure this will work with different resolutions */
767- sTransform.translate (0.0, -(sy + gapY), 0.0f);
768+ paintViewport (attrib, sTransform, infiniteRegion, output, mask, vp, vpCamPos, reflection);
769 }
770
771+ paintingDndWindow = false;
772+
773 // glNormal3f (0.0, 0.0, -1.0);
774
775 if (reflection)
776@@ -1187,12 +1373,16 @@
777
778 expoActive = false;
779
780- cScreen->setWindowPaintOffset (0, 0);
781-
782 gScreen->glPaintTransformedOutputSetCurrentIndex (glPaintTransformedOutputIndex);
783 gScreen->setTextureFilter (oldFilter);
784 }
785
786+const CompWindowList &
787+ExpoScreen::getWindowPaintList ()
788+{
789+ return dndWindows;
790+}
791+
792 bool
793 ExpoScreen::glPaintOutput (const GLScreenPaintAttrib& attrib,
794 const GLMatrix& transform,
795@@ -1243,10 +1433,15 @@
796
797 bool
798 ExpoWindow::glDraw (const GLMatrix& transform,
799- const GLWindowPaintAttrib &attrib,
800+ const GLWindowPaintAttrib &attrib,
801 const CompRegion& region,
802 unsigned int mask)
803 {
804+ GLMatrix wTransform (transform);
805+ CompPoint vp;
806+
807+ screen->viewportForGeometry (window->geometry (), vp);
808+
809 if (eScreen->expoCam == 0.0f)
810 return gWindow->glDraw (transform, attrib, region, mask);
811
812@@ -1275,8 +1470,11 @@
813 }
814 }
815
816- eAttrib.brightness = attrib.brightness * eScreen->vpBrightness;
817- eAttrib.saturation = attrib.saturation * eScreen->vpSaturation;
818+ if ((vp == eScreen->paintingVp || window->onAllViewports ()) && !eScreen->paintingDndWindow)
819+ {
820+ eAttrib.brightness = attrib.brightness * eScreen->vpBrightness;
821+ eAttrib.saturation = attrib.saturation * eScreen->vpSaturation;
822+ }
823 }
824 else
825 {
826@@ -1287,7 +1485,79 @@
827 (1 - sigmoidProgress (eScreen->expoCam));
828 }
829
830- return gWindow->glDraw (transform, eAttrib, region, mask);
831+ bool status = gWindow->glDraw (transform, eAttrib, region, mask);
832+
833+ if (window->type () & CompWindowTypeDesktopMask)
834+ {
835+ /* We want to set the geometry of the polka dots to the window
836+ * region */
837+ CompRegion reg = CompRegion (0, 0, window->width (), window->height ());
838+
839+ foreach(GLTexture * tex, eScreen->polkadots_texture)
840+ {
841+ GLTexture::MatrixList matl;
842+ GLTexture::Matrix mat = tex->matrix();
843+ CompRegion paintRegion(region);
844+
845+ float xScale = screen->width () / (float) eScreen->viewport_size.width ();
846+ float yScale = screen->height () / (float) eScreen->viewport_size.height ();
847+
848+ mat.xx *= xScale;
849+ mat.yy *= yScale;
850+
851+ /* Not sure what this does, but it is necessary
852+ * (adjusts for scale?) */
853+ mat.x0 -= mat.xx * reg.boundingRect().x1();
854+ mat.y0 -= mat.yy * reg.boundingRect().y1();
855+
856+ matl.push_back(mat);
857+
858+ if (mask & PAINT_WINDOW_TRANSFORMED_MASK)
859+ paintRegion = infiniteRegion;
860+
861+ /* Now allow plugins to mess with the geometry of our
862+ * dim (so we get a nice render for things like
863+ * wobbly etc etc */
864+ gWindow->vertexBuffer ()->begin ();
865+ gWindow->glAddGeometry (matl, reg, paintRegion);
866+ if (gWindow->vertexBuffer ()->end ())
867+ {
868+ unsigned int glDrawTextureIndex = gWindow->glDrawTextureGetCurrentIndex ();
869+ eAttrib.opacity = attrib.opacity * (((1.0 - eScreen->vpBrightness) + (1.0 - eScreen->vpSaturation) / 2.0));
870+ /* Texture rendering set-up */
871+ //eScreen->gScreen->setTexEnvMode(GL_MODULATE);
872+ glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
873+ /* Draw the dim texture with all of it's modified
874+ * geometry glory */
875+ gWindow->glDrawTextureSetCurrentIndex (MAXSHORT);
876+ gWindow->glDrawTexture (tex, transform, eAttrib, mask |
877+ PAINT_WINDOW_BLEND_MASK |
878+ PAINT_WINDOW_TRANSLUCENT_MASK |
879+ PAINT_WINDOW_TRANSFORMED_MASK);
880+ gWindow->glDrawTextureSetCurrentIndex (glDrawTextureIndex);
881+ /* Texture rendering tear-down */
882+ glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
883+ eScreen->gScreen->setTexEnvMode (GL_REPLACE);
884+ }
885+ }
886+
887+ /* Paint the outline */
888+ if (mGlowQuads && eScreen->paintingVp == eScreen->selectedVp)
889+ {
890+ if (region.numRects ())
891+ {
892+ /* reset geometry and paint */
893+ gWindow->vertexBuffer ()->begin ();
894+ gWindow->vertexBuffer ()->end ();
895+
896+ paintGlow (transform, attrib, infiniteRegion, mask);
897+ }
898+ }
899+
900+ }
901+
902+ return status;
903+
904 }
905
906 #define EXPO_GRID_SIZE 100
907@@ -1425,11 +1695,17 @@
908 const CompRegion& region,
909 unsigned int mask)
910 {
911+ GLMatrix wTransform (transform);
912+ GLWindowPaintAttrib wAttrib (attrib);
913+ CompRegion clip (region);
914+
915 if (eScreen->expoActive)
916 {
917 float opacity = 1.0;
918 bool hide;
919 bool zoomAnim;
920+ CompPoint vp;
921+ screen->viewportForGeometry (window->geometry (), vp);
922
923 zoomAnim = eScreen->optionGetExpoAnimation () ==
924 ExpoScreen::ExpoAnimationZoom;
925@@ -1458,9 +1734,47 @@
926
927 if (opacity <= 0)
928 mask |= PAINT_WINDOW_NO_CORE_INSTANCE_MASK;
929+ else
930+ wAttrib.opacity = wAttrib.opacity * opacity;
931+
932+ /* Stretch maximized windows a little so that you don't
933+ * have an awkward gap */
934+
935+ if (window->state () & MAXIMIZE_STATE &&
936+ !window->border ().top)
937+ {
938+ CompOutput *o = &screen->outputDevs ()[screen->outputDeviceForGeometry(window->geometry())];
939+ float yS = 1.0 + ((o->height () / (float) window->height ()) - 1.0f) * sigmoidProgress (eScreen->expoCam);
940+ float xS = 1.0 + ((o->width () / (float) window->width ()) - 1.0f) * sigmoidProgress (eScreen->expoCam);
941+ wTransform.translate (window->x () + window->width (),
942+ window->y () + window->height (),
943+ 0.0f);
944+ wTransform.scale (xS, yS, 1.0f);
945+ wTransform.translate (-(window->x () + window->width ()),
946+ -(window->y () + window->height ()),
947+ 0.0f);
948+
949+ if (eScreen->paintingVp != vp)
950+ mask |= PAINT_WINDOW_NO_CORE_INSTANCE_MASK;
951+
952+ mask |= PAINT_WINDOW_TRANSFORMED_MASK;
953+ }
954+
955+ if (std::find (eScreen->dndWindows.begin(), eScreen->dndWindows.end (), window) != eScreen->dndWindows.end ())
956+ {
957+ if (!eScreen->paintingDndWindow)
958+ {
959+ mask |= PAINT_WINDOW_NO_CORE_INSTANCE_MASK;
960+ }
961+ else
962+ {
963+ mask |= PAINT_WINDOW_TRANSFORMED_MASK;
964+ clip = infiniteRegion;
965+ }
966+ }
967 }
968
969- return gWindow->glPaint (attrib, transform, region, mask);
970+ return gWindow->glPaint (wAttrib, wTransform, clip, mask);
971 }
972
973 bool
974@@ -1489,7 +1803,7 @@
975 expoActive (false),
976 expoMode (false),
977 dndState (DnDNone),
978- dndWindow (NULL),
979+ dndWindows (0),
980 origVp (s->vp ()),
981 selectedVp (s->vp ()),
982 lastSelectedVp (s->vp ()),
983@@ -1497,14 +1811,21 @@
984 clickTime (0),
985 doubleClick (false),
986 vpNormals (360 * 3),
987- grabIndex (0)
988-{
989+ grabIndex (0),
990+ paintingDndWindow (false),
991+ mGlowTextureProperties (&glowTextureProperties)
992+{
993+ CompString fname;
994+ CompString pname = "expo";
995+ CompSize size;
996+
997+
998 leftKey = XKeysymToKeycode (s->dpy (), XStringToKeysym ("Left"));
999 rightKey = XKeysymToKeycode (s->dpy (), XStringToKeysym ("Right"));
1000 upKey = XKeysymToKeycode (s->dpy (), XStringToKeysym ("Up"));
1001 downKey = XKeysymToKeycode (s->dpy (), XStringToKeysym ("Down"));
1002
1003- dragCursor = XCreateFontCursor (screen->dpy (), XC_fleur);
1004+ mMoveCursor = XCreateFontCursor (screen->dpy (), XC_fleur);
1005
1006 EXPOINITBIND (ExpoKey, doExpo);
1007 EXPOTERMBIND (ExpoKey, termExpo);
1008@@ -1522,12 +1843,58 @@
1009 ScreenInterface::setHandler (screen, false);
1010 CompositeScreenInterface::setHandler (cScreen, false);
1011 GLScreenInterface::setHandler (gScreen, false);
1012+
1013+ outline_texture = GLTexture::imageDataToTexture (mGlowTextureProperties->textureData,
1014+ CompSize (mGlowTextureProperties->textureSize,
1015+ mGlowTextureProperties->textureSize),
1016+ GL_RGBA, GL_UNSIGNED_BYTE);
1017+ fname = "texture_tile.png";
1018+ polkadots_texture = GLTexture::readImageToTexture (fname, pname, polkadots_texture_size);
1019+
1020+ if (polkadots_texture.empty ())
1021+ compLogMessage ("expo", CompLogLevelWarn, "failed to bind image to texture");
1022+ else
1023+ {
1024+ foreach (GLTexture *tex, polkadots_texture)
1025+ {
1026+ tex->enable (GLTexture::Good);
1027+ glTexParameteri (tex->target (), GL_TEXTURE_WRAP_S, GL_REPEAT);
1028+ glTexParameteri (tex->target (), GL_TEXTURE_WRAP_T, GL_REPEAT);
1029+ tex->disable ();
1030+ }
1031+ }
1032 }
1033
1034 ExpoScreen::~ExpoScreen ()
1035 {
1036- if (dragCursor != None)
1037- XFreeCursor (screen->dpy (), dragCursor);
1038+ if (mMoveCursor)
1039+ XFreeCursor (screen->dpy (), mMoveCursor);
1040+}
1041+
1042+void
1043+ExpoWindow::moveNotify (int dx, int dy, bool immediate)
1044+{
1045+ window->moveNotify (dx, dy, immediate);
1046+
1047+ if (!ExpoScreen::get (screen)->expoActive)
1048+ return;
1049+
1050+ updateViewportActiveStates (screen);
1051+}
1052+
1053+void
1054+ExpoWindow::resizeNotify(int dx, int dy, int dw, int dh)
1055+{
1056+ window->resizeNotify (dx, dy, dw, dh);
1057+
1058+ /* mGlowQuads contains positional info, so we need to recalc that */
1059+ if (mGlowQuads)
1060+ {
1061+ /* FIXME: we need to find a more multitexture friendly way
1062+ * of doing this */
1063+ GLTexture::Matrix tMat = eScreen->outline_texture.at (0)->matrix ();
1064+ computeGlowQuads (&tMat);
1065+ }
1066 }
1067
1068 ExpoWindow::ExpoWindow (CompWindow *w) :
1069@@ -1535,10 +1902,28 @@
1070 window (w),
1071 cWindow (CompositeWindow::get (w)),
1072 gWindow (GLWindow::get (w)),
1073- eScreen (ExpoScreen::get (screen))
1074+ eScreen (ExpoScreen::get (screen)),
1075+ dndOpacity (0.0f),
1076+ mGlowQuads (NULL)
1077 {
1078 CompositeWindowInterface::setHandler (cWindow, false);
1079 GLWindowInterface::setHandler (gWindow, false);
1080+ WindowInterface::setHandler (window, true);
1081+
1082+ if (window->type () & CompWindowTypeDesktopMask)
1083+ {
1084+ foreach (GLTexture *tex, eScreen->outline_texture)
1085+ {
1086+ GLTexture::Matrix mat = tex->matrix ();
1087+ computeGlowQuads (&mat);
1088+ }
1089+ }
1090+}
1091+
1092+ExpoWindow::~ExpoWindow ()
1093+{
1094+ eScreen->dndWindows.remove (window);
1095+ computeGlowQuads (NULL);
1096 }
1097
1098 bool
1099Index: ubuntu/plugins/expo/src/expo.h
1100===================================================================
1101--- ubuntu.orig/plugins/expo/src/expo.h 2012-09-08 11:51:02.279175377 +0800
1102+++ ubuntu/plugins/expo/src/expo.h 2012-09-08 14:07:47.219861486 +0800
1103@@ -30,6 +30,44 @@
1104 #include <opengl/opengl.h>
1105
1106 #include "expo_options.h"
1107+#include "glow.h"
1108+#include "viewport-member-window.h"
1109+#include "client-list-generator.h"
1110+
1111+#define WIN_REAL_X(w) (w->x () - w->border ().left)
1112+#define WIN_REAL_Y(w) (w->y () - w->border ().top)
1113+#define WIN_REAL_WIDTH(w) (w->width () + 2 * w->geometry ().border () + \
1114+ w->border ().left + w->border ().right)
1115+#define WIN_REAL_HEIGHT(w) (w->height () + 2 * w->geometry ().border () + \
1116+ w->border ().top + w->border ().bottom)
1117+
1118+namespace compiz
1119+{
1120+ namespace expo
1121+ {
1122+ namespace impl
1123+ {
1124+ namespace ce = compiz::expo;
1125+
1126+ class CompizClientListGenerator :
1127+ public ce::ClientListGenerator
1128+ {
1129+ public:
1130+
1131+ CompizClientListGenerator (CompScreen *screen);
1132+
1133+ void refreshClientList ();
1134+ ViewportMemberWindow * nextClient ();
1135+
1136+ private:
1137+
1138+ CompScreen *mScreen;
1139+ const CompWindowVector *mClientList;
1140+ CompWindowVector::const_iterator mClientListIterator;
1141+ };
1142+ }
1143+ }
1144+}
1145
1146 class ExpoScreen :
1147 public ScreenInterface,
1148@@ -51,8 +89,10 @@
1149 bool glPaintOutput (const GLScreenPaintAttrib&, const GLMatrix&,
1150 const CompRegion&, CompOutput *, unsigned int);
1151 void glPaintTransformedOutput (const GLScreenPaintAttrib&,
1152- const GLMatrix&, const CompRegion&,
1153- CompOutput *, unsigned int);
1154+ const GLMatrix&, const CompRegion&,
1155+ CompOutput*, unsigned int);
1156+
1157+ const CompWindowList & getWindowPaintList ();
1158
1159 bool dndInit (CompAction *, CompAction::State, CompOption::Vector&);
1160 bool dndFini (CompAction *, CompAction::State, CompOption::Vector&);
1161@@ -62,6 +102,8 @@
1162 bool nextVp (CompAction *, CompAction::State, CompOption::Vector&);
1163 bool prevVp (CompAction *, CompAction::State, CompOption::Vector&);
1164
1165+ CompPoint currentViewport ();
1166+
1167 typedef enum {
1168 DnDNone,
1169 DnDDuring,
1170@@ -82,7 +124,7 @@
1171 bool expoMode;
1172
1173 DnDState dndState;
1174- CompWindow *dndWindow;
1175+ CompWindowList dndWindows;
1176
1177 CompPoint prevCursor;
1178 CompPoint newCursor;
1179@@ -94,6 +136,7 @@
1180 CompPoint paintingVp;
1181
1182 std::vector<float> vpActivity;
1183+ std::vector<bool> vpActive;
1184 float vpBrightness;
1185 float vpSaturation;
1186
1187@@ -113,6 +156,17 @@
1188
1189 CompScreen::GrabHandle grabIndex;
1190
1191+ GLTexture::List polkadots_texture;
1192+ CompSize polkadots_texture_size;
1193+ CompSize viewport_size;
1194+
1195+ GLTexture::List outline_texture;
1196+ CompSize outline_texture_size;
1197+
1198+ bool paintingDndWindow;
1199+
1200+ const GlowTextureProperties *mGlowTextureProperties;
1201+
1202 private:
1203 void moveFocusViewport (int, int);
1204 void finishWindowMovement ();
1205@@ -123,24 +177,45 @@
1206 void paintWall (const GLScreenPaintAttrib&, const GLMatrix&,
1207 const CompRegion&, CompOutput *, unsigned int, bool);
1208
1209+ void paintViewport (const GLScreenPaintAttrib& attrib,
1210+ const GLMatrix& transform,
1211+ const CompRegion& region,
1212+ CompOutput *output,
1213+ unsigned int mask,
1214+ CompPoint vpPos,
1215+ GLVector &vpCamPos,
1216+ bool reflection);
1217+
1218+ bool windowsOnVp (compiz::expo::ClientListGenerator &clientList,
1219+ CompPoint &p,
1220+ const CompPoint &unprojectedCursor,
1221+ const CompSize &screenSize,
1222+ CompScreen *screen);
1223+
1224 KeyCode leftKey;
1225 KeyCode rightKey;
1226 KeyCode upKey;
1227 KeyCode downKey;
1228
1229- Cursor dragCursor;
1230+ Cursor mMoveCursor;
1231 };
1232
1233 class ExpoWindow :
1234+ public compiz::expo::ViewportMemberWindow,
1235 public CompositeWindowInterface,
1236 public GLWindowInterface,
1237+ public WindowInterface,
1238 public PluginClassHandler<ExpoWindow, CompWindow>
1239 {
1240 public:
1241 ExpoWindow (CompWindow *);
1242+ ~ExpoWindow ();
1243
1244 bool damageRect (bool, const CompRect&);
1245
1246+ void resizeNotify (int dx, int dy, int dw, int dh);
1247+ void moveNotify (int dx, int dy, bool immediate);
1248+
1249 bool glDraw (const GLMatrix&, const GLWindowPaintAttrib&,
1250 const CompRegion&, unsigned int);
1251 bool glPaint (const GLWindowPaintAttrib&, const GLMatrix&,
1252@@ -150,11 +225,31 @@
1253 unsigned int, unsigned int);
1254 void glDrawTexture (GLTexture*, const GLMatrix&,
1255 const GLWindowPaintAttrib&, unsigned int);
1256+ void
1257+ paintGlow (const GLMatrix &transform,
1258+ const GLWindowPaintAttrib &attrib,
1259+ const CompRegion &paintRegion,
1260+ unsigned int mask);
1261+
1262+ void
1263+ computeGlowQuads (GLTexture::Matrix *matrix);
1264
1265 CompWindow *window;
1266 CompositeWindow *cWindow;
1267 GLWindow *gWindow;
1268 ExpoScreen *eScreen;
1269+
1270+ float dndOpacity;
1271+
1272+ GlowQuad *mGlowQuads;
1273+
1274+ private:
1275+
1276+ bool isDesktopOrDock () const;
1277+ bool dragged () const;
1278+ const compiz::window::Geometry & absoluteGeometry () const;
1279+
1280+ mutable compiz::window::Geometry mAbsoluteGeometry;
1281 };
1282
1283 class ExpoPluginVTable :
1284Index: ubuntu/plugins/expo/src/glow.cpp
1285===================================================================
1286--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1287+++ ubuntu/plugins/expo/src/glow.cpp 2012-09-08 11:51:33.107328243 +0800
1288@@ -0,0 +1,429 @@
1289+/**
1290+ *
1291+ * Compiz group plugin
1292+ *
1293+ * glow.cpp
1294+ *
1295+ * Copyright : (C) 2006-2010 by Patrick Niklaus, Roi Cohen,
1296+ * Danny Baumann, Sam Spilsbury
1297+ * Authors: Patrick Niklaus <patrick.niklaus@googlemail.com>
1298+ * Roi Cohen <roico.beryl@gmail.com>
1299+ * Danny Baumann <maniac@opencompositing.org>
1300+ * Sam Spilsbury <smspillaz@gmail.com>
1301+ *
1302+ *
1303+ * This program is free software; you can redistribute it and/or
1304+ * modify it under the terms of the GNU General Public License
1305+ * as published by the Free Software Foundation; either version 2
1306+ * of the License, or (at your option) any later version.
1307+ *
1308+ * This program is distributed in the hope that it will be useful,
1309+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1310+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1311+ * GNU General Public License for more details.
1312+ *
1313+ **/
1314+
1315+#include "expo.h"
1316+#include "group_glow.h"
1317+
1318+const GlowTextureProperties glowTextureProperties = {
1319+ /* GlowTextureRectangular */
1320+ glowTexRect, 32, 21
1321+};
1322+
1323+/*
1324+ * GroupWindow::paintGlow
1325+ *
1326+ * Takes our glow texture, stretches the appropriate positions in the glow texture,
1327+ * adds those geometries (so plugins like wobby and deform this texture correctly)
1328+ * and then draws the glow texture with this geometry (plugins like wobbly and friends
1329+ * will automatically deform the texture based on our set geometry)
1330+ */
1331+
1332+void
1333+ExpoWindow::paintGlow (const GLMatrix &transform,
1334+ const GLWindowPaintAttrib &attrib,
1335+ const CompRegion &paintRegion,
1336+ unsigned int mask)
1337+{
1338+ CompRegion reg;
1339+ int i;
1340+ GLushort colorData[4];
1341+ const GLushort *selColorData = ExpoScreen::get (screen)->optionGetSelectedColor ();
1342+ float alpha = (float) selColorData[3] / 65535.0f;
1343+
1344+ /* Premultiply color */
1345+ colorData[0] = selColorData[0] * alpha;
1346+ colorData[1] = selColorData[1] * alpha;
1347+ colorData[2] = selColorData[2] * alpha;
1348+ colorData[3] = selColorData[3];
1349+
1350+ gWindow->vertexBuffer ()->begin ();
1351+
1352+ /* There are 8 glow parts of the glow texture which we wish to paint
1353+ * separately with different transformations
1354+ */
1355+ for (i = 0; i < NUM_GLOWQUADS; i++)
1356+ {
1357+ /* Using precalculated quads here */
1358+ reg = CompRegion (mGlowQuads[i].mBox);
1359+
1360+ if (reg.boundingRect ().x1 () < reg.boundingRect ().x2 () &&
1361+ reg.boundingRect ().y1 () < reg.boundingRect ().y2 ())
1362+ {
1363+ GLTexture::MatrixList matl;
1364+ reg = CompRegion (reg.boundingRect ().x1 (),
1365+ reg.boundingRect ().y1 (),
1366+ reg.boundingRect ().width (),
1367+ reg.boundingRect ().height ());
1368+
1369+ matl.push_back (mGlowQuads[i].mMatrix);
1370+ /* Add color data for all 6 vertices of the quad */
1371+ for (int n = 0; n < 6; n++)
1372+ gWindow->vertexBuffer ()->addColors (1, colorData);
1373+ gWindow->glAddGeometry (matl, reg, paintRegion);
1374+ }
1375+ }
1376+
1377+ if (gWindow->vertexBuffer ()->end ())
1378+ {
1379+ //GLScreen::get (screen)->setTexEnvMode (GL_MODULATE);
1380+ glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
1381+
1382+ /* we use PAINT_WINDOW_TRANSFORMED_MASK here to force
1383+ the usage of a good texture filter */
1384+ foreach (GLTexture *tex, ExpoScreen::get (screen)->outline_texture)
1385+ {
1386+ gWindow->glDrawTexture (tex, transform, attrib, mask |
1387+ PAINT_WINDOW_BLEND_MASK |
1388+ PAINT_WINDOW_TRANSLUCENT_MASK |
1389+ PAINT_WINDOW_TRANSFORMED_MASK);
1390+ }
1391+
1392+ glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
1393+ GLScreen::get (screen)->setTexEnvMode (GL_REPLACE);
1394+ }
1395+}
1396+
1397+/*
1398+ * ExpoWindow::computeGlowQuads
1399+ *
1400+ * This function computures the matrix transformation required for each
1401+ * part of the glow texture which we wish to stretch to some rectangular
1402+ * dimentions
1403+ *
1404+ * There are eight quads different parts of the texture which we wish to
1405+ * paint here, the 4 sides and four corners, eg:
1406+ *
1407+ * ------------------
1408+ * | 1 | 4 | 6 |
1409+ * ------------- ------------------
1410+ * | 1 | 4 | 6 | | | | |
1411+ * ------------- | | | |
1412+ * | 2 | n | 7 | -> | 2 | n | 7 |
1413+ * ------------- | | | |
1414+ * | 3 | 5 | 8 | | | | |
1415+ * ------------- ------------------
1416+ * | 3 | 5 | 8 |
1417+ * ------------------
1418+ *
1419+ * In this example here, 2, 4, 5 and 7 are stretched, and the matrices for
1420+ * each quad rect adjusted accordingly for it's size compared to the original
1421+ * texture size.
1422+ *
1423+ * When we are adjusting the matrices here, the initial size of each corner has
1424+ * a size of of "1.0f", so according to 2x2 matrix rules,
1425+ * the scale factor is the inverse of the size of the glow (which explains
1426+ * while you will see here that matrix->xx is (1 / glowSize)
1427+ * where glowSize is the size the user specifies they want their glow to extend.
1428+ * (likewise, matrix->yy is adjusted similarly for corners and for top/bottom)
1429+ *
1430+ * matrix->x0 and matrix->y0 here are set to be the top left edge of the rect
1431+ * adjusted by the matrix scale factor (matrix->xx and matrix->yy)
1432+ *
1433+ */
1434+void
1435+ExpoWindow::computeGlowQuads (GLTexture::Matrix *matrix)
1436+{
1437+ CompRect *box;
1438+ int x1, x2, y1, y2;
1439+ GLTexture::Matrix *quadMatrix;
1440+ int glowSize, glowOffset;
1441+ CompWindow *w = window;
1442+
1443+ /* Passing NULL to this function frees the glow quads
1444+ * (so the window is not painted with glow) */
1445+
1446+ if (matrix)
1447+ {
1448+ if (!mGlowQuads)
1449+ mGlowQuads = new GlowQuad[NUM_GLOWQUADS];
1450+ if (!mGlowQuads)
1451+ return;
1452+ }
1453+ else
1454+ {
1455+ if (mGlowQuads)
1456+ {
1457+ delete[] mGlowQuads;
1458+ mGlowQuads = NULL;
1459+ }
1460+ return;
1461+ }
1462+
1463+ glowSize = 48;
1464+ glowOffset = (glowSize * ExpoScreen::get (screen)->mGlowTextureProperties->glowOffset /
1465+ ExpoScreen::get (screen)->mGlowTextureProperties->textureSize) + 1;
1466+
1467+ /* Top left corner */
1468+ box = &mGlowQuads[GLOWQUAD_TOPLEFT].mBox;
1469+ mGlowQuads[GLOWQUAD_TOPLEFT].mMatrix = *matrix;
1470+ quadMatrix = &mGlowQuads[GLOWQUAD_TOPLEFT].mMatrix;
1471+
1472+ /* Set the desired rect dimentions
1473+ * for the part of the glow we are painting */
1474+
1475+ x1 = WIN_REAL_X (w) - glowSize + glowOffset;
1476+ y1 = WIN_REAL_Y (w) - glowSize + glowOffset;
1477+
1478+ /* 2x2 Matrix here, adjust both x and y scale factors
1479+ * and the x and y position
1480+ *
1481+ * Scaling both parts of the texture in a positive direction
1482+ * here (left to right top to bottom)
1483+ *
1484+ * The base position (x0 and y0) here requires us to move backwards
1485+ * on the x and y dimentions by the calculated rect dimentions
1486+ * multiplied by the scale factors
1487+ */
1488+
1489+ quadMatrix->xx = 1.0f / glowSize;
1490+ quadMatrix->yy = 1.0f / (glowSize);
1491+ quadMatrix->x0 = -(x1 * quadMatrix->xx);
1492+ quadMatrix->y0 = -(y1 * quadMatrix->yy);
1493+
1494+ x2 = MIN (WIN_REAL_X (w) + glowOffset,
1495+ WIN_REAL_X (w) + (WIN_REAL_WIDTH (w) / 2));
1496+ y2 = MIN (WIN_REAL_Y (w) + glowOffset,
1497+ WIN_REAL_Y (w) + (WIN_REAL_HEIGHT (w) / 2));
1498+
1499+ *box = CompRect (x1, y1, x2 - x1, y2 - y1);
1500+
1501+ /* Top right corner */
1502+ box = &mGlowQuads[GLOWQUAD_TOPRIGHT].mBox;
1503+ mGlowQuads[GLOWQUAD_TOPRIGHT].mMatrix = *matrix;
1504+ quadMatrix = &mGlowQuads[GLOWQUAD_TOPRIGHT].mMatrix;
1505+
1506+ /* Set the desired rect dimentions
1507+ * for the part of the glow we are painting */
1508+
1509+ x1 = WIN_REAL_X (w) + WIN_REAL_WIDTH (w) - glowOffset;
1510+ y1 = WIN_REAL_Y (w) - glowSize + glowOffset;
1511+ x2 = WIN_REAL_X (w) + WIN_REAL_WIDTH (w) + glowSize - glowOffset;
1512+
1513+ /* 2x2 Matrix here, adjust both x and y scale factors
1514+ * and the x and y position
1515+ *
1516+ * Scaling the y part of the texture in a positive direction
1517+ * and the x part in a negative direction here
1518+ * (right to left top to bottom)
1519+ *
1520+ * The base position (x0 and y0) here requires us to move backwards
1521+ * on the y dimention and forwards on x by the calculated rect dimentions
1522+ * multiplied by the scale factors (since we are moving forward on x we
1523+ * need the inverse of that which is 1 - x1 * xx
1524+ */
1525+
1526+ quadMatrix->xx = -1.0f / glowSize;
1527+ quadMatrix->yy = 1.0f / glowSize;
1528+ quadMatrix->x0 = 1.0 - (x1 * quadMatrix->xx);
1529+ quadMatrix->y0 = -(y1 * quadMatrix->yy);
1530+
1531+ x1 = MAX (WIN_REAL_X (w) + WIN_REAL_WIDTH (w) - glowOffset,
1532+ WIN_REAL_X (w) + (WIN_REAL_WIDTH (w) / 2));
1533+ y2 = MIN (WIN_REAL_Y (w) + glowOffset,
1534+ WIN_REAL_Y (w) + (WIN_REAL_HEIGHT (w) / 2));
1535+
1536+ *box = CompRect (x1, y1, x2 - x1, y2 - y1);
1537+
1538+ /* Bottom left corner */
1539+ box = &mGlowQuads[GLOWQUAD_BOTTOMLEFT].mBox;
1540+ mGlowQuads[GLOWQUAD_BOTTOMLEFT].mMatrix = *matrix;
1541+ quadMatrix = &mGlowQuads[GLOWQUAD_BOTTOMLEFT].mMatrix;
1542+
1543+ x1 = WIN_REAL_X (w) - glowSize + glowOffset;
1544+ y1 = WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) - glowOffset;
1545+ x2 = WIN_REAL_X (w) + glowOffset;
1546+ y2 = WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) + glowSize - glowOffset;
1547+
1548+ /* 2x2 Matrix here, adjust both x and y scale factors
1549+ * and the x and y position
1550+ *
1551+ * Scaling the x part of the texture in a positive direction
1552+ * and the y part in a negative direction here
1553+ * (left to right bottom to top)
1554+ *
1555+ * The base position (x0 and y0) here requires us to move backwards
1556+ * on the x dimention and forwards on y by the calculated rect dimentions
1557+ * multiplied by the scale factors (since we are moving forward on x we
1558+ * need the inverse of that which is 1 - y1 * yy
1559+ */
1560+
1561+ quadMatrix->xx = 1.0f / glowSize;
1562+ quadMatrix->yy = -1.0f / glowSize;
1563+ quadMatrix->x0 = -(x1 * quadMatrix->xx);
1564+ quadMatrix->y0 = 1.0f - (y1 * quadMatrix->yy);
1565+
1566+ y1 = MAX (WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) - glowOffset,
1567+ WIN_REAL_Y (w) + (WIN_REAL_HEIGHT (w) / 2));
1568+ x2 = MIN (WIN_REAL_X (w) + glowOffset,
1569+ WIN_REAL_X (w) + (WIN_REAL_WIDTH (w) / 2));
1570+
1571+ *box = CompRect (x1, y1, x2 - x1, y2 - y1);
1572+
1573+ /* Bottom right corner */
1574+ box = &mGlowQuads[GLOWQUAD_BOTTOMRIGHT].mBox;
1575+ mGlowQuads[GLOWQUAD_BOTTOMRIGHT].mMatrix = *matrix;
1576+ quadMatrix = &mGlowQuads[GLOWQUAD_BOTTOMRIGHT].mMatrix;
1577+
1578+ x1 = WIN_REAL_X (w) + WIN_REAL_WIDTH (w) - glowOffset;
1579+ y1 = WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) - glowOffset;
1580+ x2 = WIN_REAL_X (w) + WIN_REAL_WIDTH (w) + glowSize - glowOffset;
1581+ y2 = WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) + glowSize - glowOffset;
1582+
1583+ /* 2x2 Matrix here, adjust both x and y scale factors
1584+ * and the x and y position
1585+ *
1586+ * Scaling the both parts of the texture in a negative direction
1587+ * (right to left bottom to top)
1588+ *
1589+ * The base position (x0 and y0) here requires us to move forwards
1590+ * on both dimentions by the calculated rect dimentions
1591+ * multiplied by the scale factors
1592+ */
1593+
1594+ quadMatrix->xx = -1.0f / glowSize;
1595+ quadMatrix->yy = -1.0f / glowSize;
1596+ quadMatrix->x0 = 1.0 - (x1 * quadMatrix->xx);
1597+ quadMatrix->y0 = 1.0 - (y1 * quadMatrix->yy);
1598+
1599+ x1 = MAX (WIN_REAL_X (w) + WIN_REAL_WIDTH (w) - glowOffset,
1600+ WIN_REAL_X (w) + (WIN_REAL_WIDTH (w) / 2));
1601+ y1 = MAX (WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) - glowOffset,
1602+ WIN_REAL_Y (w) + (WIN_REAL_HEIGHT (w) / 2));
1603+
1604+ *box = CompRect (x1, y1, x2 - x1, y2 - y1);
1605+
1606+ /* Top edge */
1607+ box = &mGlowQuads[GLOWQUAD_TOP].mBox;
1608+ mGlowQuads[GLOWQUAD_TOP].mMatrix = *matrix;
1609+ quadMatrix = &mGlowQuads[GLOWQUAD_TOP].mMatrix;
1610+
1611+ x1 = WIN_REAL_X (w) + glowOffset;
1612+ y1 = WIN_REAL_Y (w) - glowSize + glowOffset;
1613+ x2 = WIN_REAL_X (w) + WIN_REAL_WIDTH (w) - glowOffset;
1614+ y2 = WIN_REAL_Y (w) + glowOffset;
1615+
1616+ /* 2x2 Matrix here, adjust both x and y scale factors
1617+ * and the x and y position
1618+ *
1619+ * No need to scale the x part of the texture here, but we
1620+ * are scaling on the y part in a positive direciton
1621+ *
1622+ * The base position (y0) here requires us to move backwards
1623+ * on the x dimention and forwards on y by the calculated rect dimentions
1624+ * multiplied by the scale factors
1625+ */
1626+
1627+ quadMatrix->xx = 0.0f;
1628+ quadMatrix->yy = 1.0f / glowSize;
1629+ quadMatrix->x0 = 1.0;
1630+ quadMatrix->y0 = -(y1 * quadMatrix->yy);
1631+
1632+ *box = CompRect (x1, y1, x2 - x1, y2 - y1);
1633+
1634+ /* Bottom edge */
1635+ box = &mGlowQuads[GLOWQUAD_BOTTOM].mBox;
1636+ mGlowQuads[GLOWQUAD_BOTTOM].mMatrix = *matrix;
1637+ quadMatrix = &mGlowQuads[GLOWQUAD_BOTTOM].mMatrix;
1638+
1639+ x1 = WIN_REAL_X (w) + glowOffset;
1640+ y1 = WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) - glowOffset;
1641+ x2 = WIN_REAL_X (w) + WIN_REAL_WIDTH (w) - glowOffset;
1642+ y2 = WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) + glowSize - glowOffset;
1643+
1644+ /* 2x2 Matrix here, adjust both x and y scale factors
1645+ * and the x and y position
1646+ *
1647+ * No need to scale the x part of the texture here, but we
1648+ * are scaling on the y part in a negative direciton
1649+ *
1650+ * The base position (y0) here requires us to move forwards
1651+ * on y by the calculated rect dimentions
1652+ * multiplied by the scale factors
1653+ */
1654+
1655+ quadMatrix->xx = 0.0f;
1656+ quadMatrix->yy = -1.0f / glowSize;
1657+ quadMatrix->x0 = 1.0;
1658+ quadMatrix->y0 = 1.0 - (y1 * quadMatrix->yy);
1659+
1660+ *box = CompRect (x1, y1, x2 - x1, y2 - y1);
1661+
1662+ /* Left edge */
1663+ box = &mGlowQuads[GLOWQUAD_LEFT].mBox;
1664+ mGlowQuads[GLOWQUAD_LEFT].mMatrix = *matrix;
1665+ quadMatrix = &mGlowQuads[GLOWQUAD_LEFT].mMatrix;
1666+
1667+ x1 = WIN_REAL_X (w) - glowSize + glowOffset;
1668+ y1 = WIN_REAL_Y (w) + glowOffset;
1669+ x2 = WIN_REAL_X (w) + glowOffset;
1670+ y2 = WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) - glowOffset;
1671+
1672+ /* 2x2 Matrix here, adjust both x and y scale factors
1673+ * and the x and y position
1674+ *
1675+ * No need to scale the y part of the texture here, but we
1676+ * are scaling on the x part in a positive direciton
1677+ *
1678+ * The base position (x0) here requires us to move backwards
1679+ * on x by the calculated rect dimentions
1680+ * multiplied by the scale factors
1681+ */
1682+
1683+ quadMatrix->xx = 1.0f / glowSize;
1684+ quadMatrix->yy = 0.0f;
1685+ quadMatrix->x0 = -(x1 * quadMatrix->xx);
1686+ quadMatrix->y0 = 1.0;
1687+
1688+ *box = CompRect (x1, y1, x2 - x1, y2 - y1);
1689+
1690+ /* Right edge */
1691+ box = &mGlowQuads[GLOWQUAD_RIGHT].mBox;
1692+ mGlowQuads[GLOWQUAD_RIGHT].mMatrix = *matrix;
1693+ quadMatrix = &mGlowQuads[GLOWQUAD_RIGHT].mMatrix;
1694+
1695+ x1 = WIN_REAL_X (w) + WIN_REAL_WIDTH (w) - glowOffset;
1696+ y1 = WIN_REAL_Y (w) + glowOffset;
1697+ x2 = WIN_REAL_X (w) + WIN_REAL_WIDTH (w) + glowSize - glowOffset;
1698+ y2 = WIN_REAL_Y (w) + WIN_REAL_HEIGHT (w) - glowOffset;
1699+
1700+ /* 2x2 Matrix here, adjust both x and y scale factors
1701+ * and the x and y position
1702+ *
1703+ * No need to scale the y part of the texture here, but we
1704+ * are scaling on the x part in a negative direciton
1705+ *
1706+ * The base position (x0) here requires us to move forwards
1707+ * on x by the calculated rect dimentions
1708+ * multiplied by the scale factors
1709+ */
1710+
1711+ quadMatrix->xx = -1.0f / glowSize;
1712+ quadMatrix->yy = 0.0f;
1713+ quadMatrix->x0 = 1.0 - (x1 * quadMatrix->xx);
1714+ quadMatrix->y0 = 1.0;
1715+
1716+ *box = CompRect (x1, y1, x2 - x1, y2 - y1);
1717+}
1718Index: ubuntu/plugins/expo/src/glow.h
1719===================================================================
1720--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1721+++ ubuntu/plugins/expo/src/glow.h 2012-09-08 11:51:33.107328243 +0800
1722@@ -0,0 +1,66 @@
1723+/**
1724+ *
1725+ * Compiz group plugin
1726+ *
1727+ * glow.h
1728+ *
1729+ * Copyright : (C) 2006-2010 by Patrick Niklaus, Roi Cohen,
1730+ * Danny Baumann, Sam Spilsbury
1731+ * Authors: Patrick Niklaus <patrick.niklaus@googlemail.com>
1732+ * Roi Cohen <roico.beryl@gmail.com>
1733+ * Danny Baumann <maniac@opencompositing.org>
1734+ * Sam Spilsbury <smspillaz@gmail.com>
1735+ *
1736+ *
1737+ * This program is free software; you can redistribute it and/or
1738+ * modify it under the terms of the GNU General Public License
1739+ * as published by the Free Software Foundation; either version 2
1740+ * of the License, or (at your option) any later version.
1741+ *
1742+ * This program is distributed in the hope that it will be useful,
1743+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1744+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1745+ * GNU General Public License for more details.
1746+ *
1747+ **/
1748+
1749+#ifndef _EXPO_GLOW_H
1750+#define _EXPO_GLOW_H
1751+
1752+#define GLOWQUAD_TOPLEFT 0
1753+#define GLOWQUAD_TOPRIGHT 1
1754+#define GLOWQUAD_BOTTOMLEFT 2
1755+#define GLOWQUAD_BOTTOMRIGHT 3
1756+#define GLOWQUAD_TOP 4
1757+#define GLOWQUAD_BOTTOM 5
1758+#define GLOWQUAD_LEFT 6
1759+#define GLOWQUAD_RIGHT 7
1760+#define NUM_GLOWQUADS 8
1761+
1762+/* Represents a particular glow texture, so here
1763+ * we have hardcoded in the texture data, the offset
1764+ * and the size of the texture
1765+ */
1766+
1767+typedef struct _GlowTextureProperties {
1768+ char *textureData;
1769+ int textureSize;
1770+ int glowOffset;
1771+} GlowTextureProperties;
1772+
1773+/* Each glow quad contains a 2x2 scale + positional matrix
1774+ * (the 3rd column is not used since that is for matrix skew
1775+ * operations which we do not care about)
1776+ * and also a CompRect which describes the size and position of
1777+ * the quad on the glow
1778+ */
1779+
1780+class GlowQuad {
1781+ public:
1782+ CompRect mBox;
1783+ GLTexture::Matrix mMatrix;
1784+};
1785+
1786+extern const GlowTextureProperties glowTextureProperties;
1787+
1788+#endif
1789Index: ubuntu/plugins/expo/src/group_glow.h
1790===================================================================
1791--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1792+++ ubuntu/plugins/expo/src/group_glow.h 2012-09-08 11:51:33.107328243 +0800
1793@@ -0,0 +1,197 @@
1794+#ifndef _GROUP_GLOWTEX_H
1795+#define _GROUP_GLOWTEX_H
1796+
1797+/**
1798+ *
1799+ * Compiz group plugin
1800+ *
1801+ * group_glow.h
1802+ *
1803+ * Copyright : (C) 2006-2010 by Patrick Niklaus, Roi Cohen,
1804+ * Danny Baumann, Sam Spilsbury
1805+ * Authors: Patrick Niklaus <patrick.niklaus@googlemail.com>
1806+ * Roi Cohen <roico.beryl@gmail.com>
1807+ * Danny Baumann <maniac@opencompositing.org>
1808+ * Sam Spilsbury <smspillaz@gmail.com>
1809+ *
1810+ *
1811+ * This program is free software; you can redistribute it and/or
1812+ * modify it under the terms of the GNU General Public License
1813+ * as published by the Free Software Foundation; either version 2
1814+ * of the License, or (at your option) any later version.
1815+ *
1816+ * This program is distributed in the hope that it will be useful,
1817+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1818+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1819+ * GNU General Public License for more details.
1820+ *
1821+ **/
1822+
1823+/*
1824+ * glowTex
1825+ */
1826+
1827+static char glowTexRect[4097] = {
1828+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1829+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1830+ "\0\0\0\0\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"
1831+ "\377\377\6\377\377\377\6\377\377\377\6\377\377\377\6\377\377\377\6\377\377"
1832+ "\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"
1833+ "\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"
1834+ "\377\6\377\377\377\6\377\377\377\6\377\377\377\6\377\377\377\6\377\377\377"
1835+ "\6\377\377\377\6\377\377\377\6\377\377\377\6\377\377\377\6\377\377\377\6"
1836+ "\377\377\377\14\377\377\377\14\377\377\377\14\377\377\377\14\377\377\377"
1837+ "\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"
1838+ "\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\6\377\377\377\6\377\377\377\14"
1839+ "\377\377\377\14\377\377\377\22\377\377\377\22\377\377\377\22\377\377\377"
1840+ "\27\377\377\377\27\377\377\377\27\377\377\377\27\377\377\377\27\377\377\377"
1841+ "\27\377\377\377\27\377\377\377\27\377\377\377\27\377\377\377\27\377\377\377"
1842+ "\35\377\377\377\35\377\377\377\35\377\377\377\35\377\377\377\35\377\377\377"
1843+ "\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"
1844+ "\377\6\377\377\377\6\377\377\377\14\377\377\377\22\377\377\377\27\377\377"
1845+ "\377\27\377\377\377\35\377\377\377#\377\377\377'\377\377\377'\377\377\377"
1846+ "+\377\377\377+\377\377\377+\377\377\377+\377\377\377+\377\377\377+\377\377"
1847+ "\377+\377\377\377+\377\377\377+\377\377\3771\377\377\3771\377\377\3771\377"
1848+ "\377\3771\377\377\3771\377\377\3771\377\377\3771\0\0\0\0\0\0\0\0\0\0\0\0"
1849+ "\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\14\377\377\377\22\377\377\377"
1850+ "\27\377\377\377\35\377\377\377#\377\377\377+\377\377\3771\377\377\3776\377"
1851+ "\377\377<\377\377\377>\377\377\377C\377\377\377I\377\377\377I\377\377\377"
1852+ "I\377\377\377I\377\377\377I\377\377\377I\377\377\377I\377\377\377I\377\377"
1853+ "\377L\377\377\377L\377\377\377L\377\377\377L\377\377\377L\377\377\377L\377"
1854+ "\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"
1855+ "\377\377\22\377\377\377\27\377\377\377#\377\377\377+\377\377\3776\377\377"
1856+ "\377C\377\377\377L\377\377\377U\377\377\377]\377\377\377`\377\377\377d\377"
1857+ "\377\377h\377\377\377k\377\377\377k\377\377\377k\377\377\377k\377\377\377"
1858+ "k\377\377\377k\377\377\377k\377\377\377p\377\377\377p\377\377\377p\377\377"
1859+ "\377p\377\377\377p\377\377\377p\377\377\377p\0\0\0\0\0\0\0\0\0\0\0\0\377"
1860+ "\377\377\6\377\377\377\14\377\377\377\22\314\314\314\35\377\377\377'\377"
1861+ "\377\3771\377\377\377>\357\357\357P\377\377\377]\363\363\363k\365\365\365"
1862+ "v\365\365\365|\377\377\377\202\367\367\367\210\367\367\367\214\367\367\367"
1863+ "\216\367\367\367\221\367\367\367\221\367\367\367\221\367\367\367\221\367"
1864+ "\367\367\221\367\367\367\221\367\367\367\224\367\367\367\224\367\367\367"
1865+ "\224\367\367\367\224\367\367\367\224\367\367\367\224\367\367\367\224\0\0"
1866+ "\0\0\0\0\0\0\377\377\377\6\377\377\377\6\377\377\377\22\377\377\377\27\377"
1867+ "\377\377'\377\377\3776\377\377\377I\377\377\377Y\377\377\377k\376\376\376"
1868+ "y\377\377\377\210\377\377\377\224\377\377\377\235\377\377\377\245\377\377"
1869+ "\377\253\377\377\377\255\377\377\377\262\377\377\377\262\377\377\377\263"
1870+ "\377\377\377\263\377\377\377\263\377\377\377\263\377\377\377\263\377\377"
1871+ "\377\266\377\377\377\266\377\377\377\266\377\377\377\266\377\377\377\266"
1872+ "\377\377\377\266\377\377\377\266\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377"
1873+ "\14\377\377\377\27\377\377\377#\377\377\3771\377\377\377I\377\377\377]\377"
1874+ "\377\377r\377\377\377\205\377\377\377\231\377\377\377\247\377\377\377\263"
1875+ "\377\377\377\275\377\377\377\304\377\377\377\310\377\377\377\313\377\377"
1876+ "\377\316\377\377\377\320\377\377\377\320\377\377\377\320\377\377\377\320"
1877+ "\377\377\377\320\377\377\377\320\377\377\377\322\377\377\377\322\377\377"
1878+ "\377\322\377\377\377\322\377\377\377\322\377\377\377\322\377\377\377\322"
1879+ "\0\0\0\0\377\377\377\6\377\377\377\6\377\377\377\22\377\377\377\35\377\377"
1880+ "\377+\377\377\377>\377\377\377Y\377\377\377r\377\377\377\210\376\376\376"
1881+ "\237\377\377\377\262\377\377\377\302\377\377\377\313\377\377\377\324\377"
1882+ "\377\377\332\376\376\376\336\377\377\377\341\377\377\377\342\377\377\377"
1883+ "\344\377\377\377\344\377\377\377\344\377\377\377\344\377\377\377\344\377"
1884+ "\377\377\344\377\377\377\345\377\377\377\345\377\377\377\345\377\377\377"
1885+ "\345\377\377\377\345\377\377\377\345\377\377\377\345\0\0\0\0\377\377\377"
1886+ "\6\377\377\377\14\377\377\377\27\377\377\377#\377\377\3776\377\377\377P\377"
1887+ "\377\377k\377\377\377\205\376\376\376\237\372\372\372\266\377\377\377\307"
1888+ "\373\373\373\325\373\373\373\337\374\374\374\345\374\374\374\352\374\374"
1889+ "\374\355\374\374\374\357\374\374\374\360\374\374\374\361\374\374\374\361"
1890+ "\374\374\374\362\374\374\374\362\374\374\374\362\374\374\374\362\374\374"
1891+ "\374\362\374\374\374\362\374\374\374\362\374\374\374\362\374\374\374\362"
1892+ "\374\374\374\362\374\374\374\362\0\0\0\0\377\377\377\6\377\377\377\14\377"
1893+ "\377\377\35\377\377\377+\377\377\377C\377\377\377]\377\377\377|\377\377\377"
1894+ "\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"
1895+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1896+ "\0\0\0\0\0\0\0\0\0\0\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"
1897+ "\377\377\6\377\377\377\22\324\324\324#\377\377\3771\377\377\377L\363\363"
1898+ "\363k\377\377\377\210\377\377\377\247\377\377\377\302\377\377\377\325\0\0"
1899+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1900+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1901+ "\0\0\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\14\377\377\377\22\377\377"
1902+ "\377#\377\377\377<\377\377\377U\377\377\377v\377\377\377\226\377\377\377"
1903+ "\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"
1904+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1905+ "\0\0\0\0\0\0\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"
1906+ "\6\377\377\377\14\377\377\377\27\377\377\377'\377\377\377>\377\377\377]\377"
1907+ "\377\377|\370\370\370\237\377\377\377\275\373\373\373\325\377\377\377\345"
1908+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1909+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1910+ "\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"
1911+ "\377\377+\377\377\377C\377\377\377`\377\377\377\202\377\377\377\247\377\377"
1912+ "\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"
1913+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1914+ "\0\0\0\0\0\0\0\0\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"
1915+ "\377\6\377\377\377\14\377\377\377\27\377\377\377+\377\377\377C\377\377\377"
1916+ "d\377\377\377\210\377\377\377\253\377\377\377\310\376\376\376\336\374\374"
1917+ "\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"
1918+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1919+ "\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"
1920+ "\35\377\377\377+\377\377\377I\377\377\377h\377\377\377\214\377\377\377\260"
1921+ "\377\377\377\313\374\374\374\342\374\374\374\357\0\0\0\0\0\0\0\0\0\0\0\0"
1922+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1923+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1924+ "\377\377\377\6\377\377\377\14\377\377\377\35\342\342\3421\377\377\377I\377"
1925+ "\377\377k\377\377\377\216\377\377\377\262\377\377\377\316\374\374\374\344"
1926+ "\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"
1927+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1928+ "\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"
1929+ "\377\377\35\377\377\3771\377\377\377L\377\377\377k\377\377\377\221\377\377"
1930+ "\377\263\377\377\377\320\377\377\377\344\377\377\377\361\0\0\0\0\0\0\0\0"
1931+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1932+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1933+ "\0\0\0\0\377\377\377\6\377\377\377\14\377\377\377\35\377\377\3771\377\377"
1934+ "\377L\377\377\377k\377\377\377\221\377\377\377\263\377\377\377\320\377\377"
1935+ "\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"
1936+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1937+ "\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"
1938+ "\14\377\377\377\35\377\377\3771\377\377\377L\364\364\364p\377\377\377\221"
1939+ "\372\372\372\266\377\377\377\320\374\374\374\345\377\377\377\362\0\0\0\0"
1940+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1941+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1942+ "\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\14\377\377\377\35\377\377\377"
1943+ "1\377\377\377L\377\377\377p\377\377\377\221\377\377\377\266\373\373\373\322"
1944+ "\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"
1945+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1946+ "\0\0\0\0\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"
1947+ "\377\377\14\377\377\377\35\377\377\3771\377\377\377L\377\377\377p\377\377"
1948+ "\377\221\377\377\377\266\373\373\373\322\377\377\377\345\377\377\377\362"
1949+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1950+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1951+ "\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"
1952+ "\377\3771\377\377\377L\377\377\377p\377\377\377\221\377\377\377\266\373\373"
1953+ "\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"
1954+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1955+ "\0\0\0\0\0\0\0\0\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"
1956+ "\377\6\377\377\377\14\377\377\377\35\377\377\3771\377\377\377L\377\377\377"
1957+ "p\367\367\367\224\377\377\377\266\377\377\377\322\377\377\377\345\374\374"
1958+ "\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"
1959+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1960+ "\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"
1961+ "\35\377\377\3771\377\377\377L\377\377\377p\367\367\367\224\377\377\377\266"
1962+ "\377\377\377\322\377\377\377\345\374\374\374\362\0\0\0\0\0\0\0\0\0\0\0\0"
1963+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1964+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1965+ "\377\377\377\6\377\377\377\14\377\377\377\35\377\377\3771\377\377\377L\377"
1966+ "\377\377p\367\367\367\224\377\377\377\266\377\377\377\322\377\377\377\345"
1967+ "\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"
1968+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1969+ "\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"
1970+ "\377\377\35\377\377\3771\377\377\377L\377\377\377p\367\367\367\224\377\377"
1971+ "\377\266\377\377\377\322\377\377\377\345\374\374\374\362\0\0\0\0\0\0\0\0"
1972+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1973+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1974+ "\0\0\0\0\377\377\377\6\377\377\377\14\377\377\377\35\377\377\3771\377\377"
1975+ "\377L\377\377\377p\367\367\367\224\377\377\377\266\377\377\377\322\377\377"
1976+ "\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"
1977+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1978+ "\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"
1979+ "\14\377\377\377\35\377\377\3771\377\377\377L\377\377\377p\367\367\367\224"
1980+ "\377\377\377\266\377\377\377\322\377\377\377\345\374\374\374\362\0\0\0\0"
1981+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1982+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1983+ "\0\0\0\0\0\0\0\0\377\377\377\6\377\377\377\14\377\377\377\35\377\377\377"
1984+ "1\377\377\377L\377\377\377p\367\367\367\224\377\377\377\266\377\377\377\322"
1985+ "\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"
1986+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1987+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
1988+};
1989+
1990+#endif
1991Index: ubuntu/plugins/expo/src/wall_offset/CMakeLists.txt
1992===================================================================
1993--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1994+++ ubuntu/plugins/expo/src/wall_offset/CMakeLists.txt 2012-09-08 14:56:23.698323512 +0800
1995@@ -0,0 +1,33 @@
1996+include_directories (
1997+ ${CMAKE_CURRENT_SOURCE_DIR}/include
1998+ ${CMAKE_CURRENT_SOURCE_DIR}/src
1999+ ${Boost_INCLUDE_DIRS}
2000+ ${GLIBMM_INCLUDE_DIRS}
2001+)
2002+
2003+link_directories (${GLIBMM_LIBRARY_DIRS} ${COMPIZ_LIBRARY_DIRS})
2004+
2005+set (
2006+ PRIVATE_HEADERS
2007+ ${CMAKE_CURRENT_SOURCE_DIR}/include/wall-offset.h
2008+)
2009+
2010+set (
2011+ SRCS
2012+ ${CMAKE_CURRENT_SOURCE_DIR}/src/wall-offset.cpp
2013+)
2014+
2015+add_library (
2016+ compiz_expo_wall_offset STATIC
2017+ ${SRCS}
2018+ ${PRIVATE_HEADERS}
2019+)
2020+
2021+if (COMPIZ_BUILD_TESTING)
2022+ add_subdirectory ( ${CMAKE_CURRENT_SOURCE_DIR}/tests )
2023+endif (COMPIZ_BUILD_TESTING)
2024+
2025+target_link_libraries (
2026+ compiz_expo_wall_offset
2027+ compiz_core
2028+)
2029Index: ubuntu/plugins/expo/src/wall_offset/include/wall-offset.h
2030===================================================================
2031--- /dev/null 1970-01-01 00:00:00.000000000 +0000
2032+++ ubuntu/plugins/expo/src/wall_offset/include/wall-offset.h 2012-09-08 11:51:33.107328243 +0800
2033@@ -0,0 +1,43 @@
2034+/**
2035+ * Copyright © 2012 Canonical Ltd.
2036+ *
2037+ * Authors:
2038+ * Sam Spilsbury <sam.spilsbury@canonical.com>
2039+ *
2040+ * This program is free software; you can redistribute it and/or
2041+ * modify it under the terms of the GNU General Public License
2042+ * as published by the Free Software Foundation; either version 2
2043+ * of the License, or (at your option) any later version.
2044+ *
2045+ * This program is distributed in the hope that it will be useful,
2046+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2047+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2048+ * GNU General Public License for more details.
2049+ *
2050+ **/
2051+
2052+#ifndef _COMPIZ_EXPO_WALL_OFFSET_H
2053+#define _COMPIZ_EXPO_WALL_OFFSET_H
2054+
2055+#include <core/point.h>
2056+#include <core/size.h>
2057+#include <core/rect.h>
2058+
2059+namespace compiz
2060+{
2061+ namespace expo
2062+ {
2063+ void
2064+ calculateWallOffset (const CompRect &output,
2065+ const CompPoint &offsetInScreenCoords,
2066+ const CompPoint &vpSize,
2067+ const CompSize &screenSize,
2068+ float &offsetInWorldX,
2069+ float &offsetInWorldY,
2070+ float &worldScaleFactorX,
2071+ float &worldScaleFactorY,
2072+ float animationProgress);
2073+ }
2074+}
2075+
2076+#endif
2077Index: ubuntu/plugins/expo/src/wall_offset/src/wall-offset.cpp
2078===================================================================
2079--- /dev/null 1970-01-01 00:00:00.000000000 +0000
2080+++ ubuntu/plugins/expo/src/wall_offset/src/wall-offset.cpp 2012-09-08 16:54:24.033432999 +0800
2081@@ -0,0 +1,55 @@
2082+/**
2083+ * Copyright © 2012 Canonical Ltd.
2084+ *
2085+ * Authors:
2086+ * Sam Spilsbury <sam.spilsbury@canonical.com>
2087+ *
2088+ * This program is free software; you can redistribute it and/or
2089+ * modify it under the terms of the GNU General Public License
2090+ * as published by the Free Software Foundation; either version 2
2091+ * of the License, or (at your option) any later version.
2092+ *
2093+ * This program is distributed in the hope that it will be useful,
2094+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2095+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2096+ * GNU General Public License for more details.
2097+ *
2098+ **/
2099+#include "wall-offset.h"
2100+
2101+namespace compiz
2102+{
2103+ namespace expo
2104+ {
2105+ void
2106+ calculateWallOffset (const CompRect &output,
2107+ const CompPoint &offsetInScreenCoords,
2108+ const CompPoint &vpSize,
2109+ const CompSize &screenSize,
2110+ float &offsetInWorldX,
2111+ float &offsetInWorldY,
2112+ float &worldScaleFactorX,
2113+ float &worldScaleFactorY,
2114+ float animationProgress)
2115+ {
2116+ const float sx = screenSize.width () / static_cast <float> (output.width ());
2117+ const float sy = screenSize.height () / static_cast <float> (output.height ());
2118+ offsetInWorldX = 0.0;
2119+ offsetInWorldY = 0.0;
2120+ worldScaleFactorX = 1.0f;
2121+ worldScaleFactorY = 1.0f;
2122+
2123+ if (output.left () == 0)
2124+ {
2125+ offsetInWorldX = ((vpSize.x () * sx) / ((float) output.width ()) * (offsetInScreenCoords.x ()) * animationProgress);
2126+ worldScaleFactorX = 1.0f - ((float) (offsetInScreenCoords.x ()) / (float) (output.width ())) * animationProgress;
2127+ }
2128+
2129+ if (output.top () == 0)
2130+ {
2131+ offsetInWorldY = ((vpSize.y () * sy) / ((float) output.height ()) * (offsetInScreenCoords.y ()) * animationProgress);
2132+ worldScaleFactorY = 1.0f - ((float) (offsetInScreenCoords.y ()) / (float) output.height ()) * animationProgress;
2133+ }
2134+ }
2135+ }
2136+}
2137Index: ubuntu/plugins/expo/src/wall_offset/tests/CMakeLists.txt
2138===================================================================
2139--- /dev/null 1970-01-01 00:00:00.000000000 +0000
2140+++ ubuntu/plugins/expo/src/wall_offset/tests/CMakeLists.txt 2012-09-08 11:51:33.107328243 +0800
2141@@ -0,0 +1,19 @@
2142+if (NOT GTEST_FOUND)
2143+ message ("Google Test not found - cannot build tests!")
2144+ set (COMPIZ_BUILD_TESTING OFF)
2145+endif (NOT GTEST_FOUND)
2146+
2147+include_directories (${GTEST_INCLUDE_DIRS})
2148+
2149+link_directories (${COMPIZ_LIBRARY_DIRS})
2150+
2151+add_executable (compiz_test_expo_wall_offset
2152+ ${CMAKE_CURRENT_SOURCE_DIR}/test-expo-wall-offset.cpp)
2153+
2154+target_link_libraries (compiz_test_expo_wall_offset
2155+ compiz_expo_wall_offset
2156+ ${GTEST_BOTH_LIBRARIES}
2157+ ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
2158+ )
2159+
2160+compiz_discover_tests (compiz_test_expo_wall_offset COVERAGE compiz_expo_wall_offset)
2161Index: ubuntu/plugins/expo/src/wall_offset/tests/test-expo-wall-offset.cpp
2162===================================================================
2163--- /dev/null 1970-01-01 00:00:00.000000000 +0000
2164+++ ubuntu/plugins/expo/src/wall_offset/tests/test-expo-wall-offset.cpp 2012-09-08 17:25:18.714629857 +0800
2165@@ -0,0 +1,263 @@
2166+/*
2167+ * Copyright © 2012 Canonical Ltd.
2168+ *
2169+ * Permission to use, copy, modify, distribute, and sell this software
2170+ * and its documentation for any purpose is hereby granted without
2171+ * fee, provided that the above copyright notice appear in all copies
2172+ * and that both that copyright notice and this permission notice
2173+ * appear in supporting documentation, and that the name of
2174+ * Canonical Ltd. not be used in advertising or publicity pertaining to
2175+ * distribution of the software without specific, written prior permission.
2176+ * Canonical Ltd. makes no representations about the suitability of this
2177+ * software for any purpose. It is provided "as is" without express or
2178+ * implied warranty.
2179+ *
2180+ * CANONICAL, LTD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
2181+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
2182+ * NO EVENT SHALL CANONICAL, LTD. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
2183+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
2184+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
2185+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
2186+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2187+ *
2188+ * Authored by: Sam Spilsbury <sam.spilsbury@canonical.com>
2189+ */
2190+#include <tr1/tuple>
2191+#include <gtest/gtest.h>
2192+#include "wall-offset.h"
2193+
2194+using ::testing::WithParamInterface;
2195+using ::testing::ValuesIn;
2196+using ::testing::Combine;
2197+using ::testing::Range;
2198+
2199+class ExpoWallOffsetTest :
2200+ public ::testing::Test
2201+{
2202+ protected:
2203+
2204+ float offsetInWorldX;
2205+ float offsetInWorldY;
2206+ float worldScaleFactorX;
2207+ float worldScaleFactorY;
2208+};
2209+
2210+namespace
2211+{
2212+ const unsigned int nAnimationsBegin = 0;
2213+ const unsigned int nAnimationSteps = 20;
2214+
2215+ struct OffsetAnimationParameters
2216+ {
2217+ float offsetInWorldX;
2218+ float offsetInWorldY;
2219+ float worldScaleFactorX;
2220+ float worldScaleFactorY;
2221+ };
2222+
2223+ struct OffsetParameters
2224+ {
2225+ float offsetX;
2226+ float offsetY;
2227+ int vpSizeWidth;
2228+ int vpSizeHeight;
2229+ int screenWidth;
2230+ int screenHeight;
2231+ int outputWidth;
2232+ int outputHeight;
2233+ OffsetAnimationParameters animationParameters[20];
2234+ };
2235+
2236+ const OffsetParameters testingOffsetParameters[] =
2237+ {
2238+ {
2239+ 0,
2240+ 0,
2241+ 1,
2242+ 1,
2243+ 100,
2244+ 100,
2245+ 100,
2246+ 100,
2247+ {
2248+ { 0, 0, 1.0, 1.0 },
2249+ { 0, 0, 1.0, 1.0 },
2250+ { 0, 0, 1.0, 1.0 },
2251+ { 0, 0, 1.0, 1.0 },
2252+ { 0, 0, 1.0, 1.0 },
2253+ { 0, 0, 1.0, 1.0 },
2254+ { 0, 0, 1.0, 1.0 },
2255+ { 0, 0, 1.0, 1.0 },
2256+ { 0, 0, 1.0, 1.0 },
2257+ { 0, 0, 1.0, 1.0 },
2258+ { 0, 0, 1.0, 1.0 },
2259+ { 0, 0, 1.0, 1.0 },
2260+ { 0, 0, 1.0, 1.0 },
2261+ { 0, 0, 1.0, 1.0 },
2262+ { 0, 0, 1.0, 1.0 },
2263+ { 0, 0, 1.0, 1.0 },
2264+ { 0, 0, 1.0, 1.0 },
2265+ { 0, 0, 1.0, 1.0 },
2266+ { 0, 0, 1.0, 1.0 },
2267+ { 0, 0, 1.0, 1.0 }
2268+ }
2269+ },
2270+ /* Monitor 1280x800, Screen: 1280x800, Viewport Layout: 2x2, Offset: 32, 24 */
2271+ {
2272+ 32,
2273+ 24,
2274+ 2,
2275+ 2,
2276+ 1280,
2277+ 800,
2278+ 1280,
2279+ 800,
2280+ {
2281+ { 0, 0, 1, 1 },
2282+ { 0.0025000001769512892, 0.0011718750465661287, 0.99874997138977051, 0.99906247854232788 },
2283+ { 0.0050000003539025784, 0.0023437500931322575, 0.99750000238418579, 0.99812501668930054 },
2284+ { 0.0075000002980232239, 0.0035156251396983862, 0.9962499737739563, 0.99718749523162842 },
2285+ { 0.010000000707805157, 0.0046875001862645149, 0.99500000476837158, 0.9962499737739563 },
2286+ { 0.012500000186264515, 0.005859375, 0.99374997615814209, 0.99531251192092896 },
2287+ { 0.015000000596046448, 0.0070312502793967724, 0.99250000715255737, 0.99437499046325684 },
2288+ { 0.017500000074505806, 0.0082031246274709702, 0.99124997854232788, 0.99343752861022949 },
2289+ { 0.020000001415610313, 0.0093750003725290298, 0.99000000953674316, 0.99250000715255737 },
2290+ { 0.022499999031424522, 0.01054687425494194, 0.98874998092651367, 0.99156248569488525 },
2291+ { 0.02500000037252903, 0.01171875, 0.98750001192092896, 0.99062502384185791 },
2292+ { 0.027500001713633537, 0.01289062574505806, 0.98624998331069946, 0.98968750238418579 },
2293+ { 0.030000001192092896, 0.014062500558793545, 0.98500001430511475, 0.98874998092651367 },
2294+ { 0.032499998807907104, 0.015234374441206455, 0.98374998569488525, 0.98781251907348633 },
2295+ { 0.035000000149011612, 0.01640624925494194, 0.98250001668930054, 0.98687499761581421 },
2296+ { 0.037500001490116119, 0.017578125, 0.98124998807907104, 0.98593747615814209 },
2297+ { 0.040000002831220627, 0.01875000074505806, 0.98000001907348633, 0.98500001430511475 },
2298+ { 0.042500000447034836, 0.019921876490116119, 0.97874999046325684, 0.98406249284744263 },
2299+ { 0.044999998062849045, 0.021093748509883881, 0.97750002145767212, 0.98312497138977051 },
2300+ { 0.047499999403953552, 0.02226562425494194, 0.97624999284744263, 0.98218750953674316 }
2301+ }
2302+ },
2303+ /* Monitor 1280x1024, Screen: 2560x1024, Viewport Layout: 2x2, Offset: 32, 24 */
2304+ {
2305+ 32,
2306+ 24,
2307+ 2,
2308+ 2,
2309+ 2560,
2310+ 1024,
2311+ 1280,
2312+ 1024,
2313+ {
2314+ { 0, 0, 1, 1 },
2315+ { 0.0050000003539025784, 0.001500000013038516, 0.99874997138977051, 0.99906247854232788 },
2316+ { 0.010000000707805157, 0.0030000000260770321, 0.99750000238418579, 0.99812501668930054 },
2317+ { 0.015000000596046448, 0.0045000002719461918, 0.9962499737739563, 0.99718749523162842 },
2318+ { 0.020000001415610313, 0.0060000000521540642, 0.99500000476837158, 0.9962499737739563 },
2319+ { 0.02500000037252903, 0.0074999998323619366, 0.99374997615814209, 0.99531251192092896 },
2320+ { 0.030000001192092896, 0.0090000005438923836, 0.99250000715255737, 0.99437499046325684 },
2321+ { 0.035000000149011612, 0.010499999858438969, 0.99124997854232788, 0.99343752861022949 },
2322+ { 0.040000002831220627, 0.012000000104308128, 0.99000000953674316, 0.99250000715255737 },
2323+ { 0.044999998062849045, 0.013499999418854713, 0.98874998092651367, 0.99156248569488525 },
2324+ { 0.05000000074505806, 0.014999999664723873, 0.98750001192092896, 0.99062502384185791 },
2325+ { 0.055000003427267075, 0.016499999910593033, 0.98624998331069946, 0.98968750238418579 },
2326+ { 0.060000002384185791, 0.018000001087784767, 0.98500001430511475, 0.98874998092651367 },
2327+ { 0.064999997615814209, 0.019499998539686203, 0.98374998569488525, 0.98781251907348633 },
2328+ { 0.070000000298023224, 0.020999999716877937, 0.98250001668930054, 0.98687499761581421 },
2329+ { 0.075000002980232239, 0.022499999031424522, 0.98124998807907104, 0.98593747615814209 },
2330+ { 0.080000005662441254, 0.024000000208616257, 0.98000001907348633, 0.98500001430511475 },
2331+ { 0.085000000894069672, 0.025499999523162842, 0.97874999046325684, 0.98406249284744263 },
2332+ { 0.08999999612569809, 0.026999998837709427, 0.97750002145767212, 0.98312497138977051 },
2333+ { 0.094999998807907104, 0.028499998152256012, 0.97624999284744263, 0.98218750953674316 }
2334+ }
2335+ },
2336+ };
2337+
2338+ typedef std::tr1::tuple <OffsetParameters, unsigned int> AnimParam;
2339+}
2340+
2341+class ExpoWallOffsetTestAnimations :
2342+ public ExpoWallOffsetTest,
2343+ public ::testing::WithParamInterface <AnimParam>
2344+{
2345+ public:
2346+
2347+ void
2348+ RecordProperty (const char *name, float value)
2349+ {
2350+ ::testing::Message message;
2351+ message << value;
2352+ Test::RecordProperty (name, message.GetString ().c_str ());
2353+ }
2354+};
2355+
2356+TEST_P (ExpoWallOffsetTestAnimations, TestAnimationValues)
2357+{
2358+ const OffsetParameters &offset (std::tr1::get <0> (GetParam ()));
2359+ const unsigned int &index (std::tr1::get <1> (GetParam ()));
2360+
2361+ RecordProperty ("outputWidth", offset.outputWidth);
2362+ RecordProperty ("outputHeight", offset.outputHeight);
2363+ RecordProperty ("screenWidth", offset.screenWidth);
2364+ RecordProperty ("screenHeight", offset.screenHeight);
2365+ RecordProperty ("offsetX", offset.offsetX);
2366+ RecordProperty ("offsetY", offset.offsetY);
2367+
2368+ RecordProperty ("expected.offsetInWorldX", offset.animationParameters[index].offsetInWorldX);
2369+ RecordProperty ("expected.offsetInWorldY", offset.animationParameters[index].offsetInWorldY);
2370+ RecordProperty ("expected.worldScaleFactorX", offset.animationParameters[index].worldScaleFactorX);
2371+ RecordProperty ("expected.worldScaleFactorY", offset.animationParameters[index].worldScaleFactorY);
2372+
2373+ compiz::expo::calculateWallOffset (CompRect (0,
2374+ 0,
2375+ offset.outputWidth,
2376+ offset.outputWidth),
2377+ CompPoint (offset.offsetX,
2378+ offset.offsetY),
2379+ CompPoint (offset.vpSizeWidth,
2380+ offset.vpSizeHeight),
2381+ CompSize (offset.screenWidth,
2382+ offset.screenHeight),
2383+ offsetInWorldX,
2384+ offsetInWorldY,
2385+ worldScaleFactorX,
2386+ worldScaleFactorY,
2387+ index / static_cast <float> (nAnimationSteps));
2388+
2389+ RecordProperty ("offsetInWorldX", offsetInWorldX);
2390+ RecordProperty ("offsetInWorldY", offsetInWorldY);
2391+ RecordProperty ("worldScaleFactorX", worldScaleFactorX);
2392+ RecordProperty ("worldScaleFactorY", worldScaleFactorY);
2393+
2394+ EXPECT_EQ (offsetInWorldX, offset.animationParameters[index].offsetInWorldX);
2395+ EXPECT_EQ (offsetInWorldY, offset.animationParameters[index].offsetInWorldY);
2396+ EXPECT_EQ (worldScaleFactorX, offset.animationParameters[index].worldScaleFactorX);
2397+ EXPECT_EQ (worldScaleFactorY, offset.animationParameters[index].worldScaleFactorY);
2398+}
2399+
2400+TEST_F (ExpoWallOffsetTest, TestNoOffsetIfOutputIsNotOrigin)
2401+{
2402+ compiz::expo::calculateWallOffset (CompRect (1,
2403+ 1,
2404+ 100,
2405+ 100),
2406+ CompPoint (100,
2407+ 100),
2408+ CompPoint (1,
2409+ 1),
2410+ CompSize (100,
2411+ 100),
2412+ offsetInWorldX,
2413+ offsetInWorldY,
2414+ worldScaleFactorX,
2415+ worldScaleFactorY,
2416+ 1.0);
2417+
2418+ EXPECT_EQ (offsetInWorldX, 0.0f);
2419+ EXPECT_EQ (offsetInWorldY, 0.0f);
2420+ EXPECT_EQ (worldScaleFactorX, 1.0f);
2421+ EXPECT_EQ (worldScaleFactorY, 1.0f);
2422+}
2423+
2424+INSTANTIATE_TEST_CASE_P (ExpoAnimationOffsetTest,
2425+ ExpoWallOffsetTestAnimations,
2426+ Combine (ValuesIn (testingOffsetParameters),
2427+ Range (nAnimationsBegin,
2428+ nAnimationSteps)));
2429Index: ubuntu/plugins/expo/CMakeLists.txt
2430===================================================================
2431--- ubuntu.orig/plugins/expo/CMakeLists.txt 2012-09-08 11:51:02.279175377 +0800
2432+++ ubuntu/plugins/expo/CMakeLists.txt 2012-09-08 11:51:33.107328243 +0800
2433@@ -1,7 +1,16 @@
2434 find_package (Compiz REQUIRED)
2435 include (CompizPlugin)
2436
2437+set (COMPIZ_EXPO_PLUGIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
2438+
2439 add_subdirectory (src/click_threshold)
2440 include_directories (src/click_threshold/include)
2441+add_subdirectory (src/wall_offset)
2442+include_directories (src/wall_offset/include)
2443+add_subdirectory (src/windows_on_viewport)
2444+include_directories (src/windows_on_viewport/include)
2445
2446-compiz_plugin (expo PLUGINDEPS composite opengl LIBRARIES compiz_expo_click_threshold)
2447+compiz_plugin (expo PLUGINDEPS composite opengl LIBRARIES
2448+ compiz_expo_click_threshold
2449+ compiz_expo_wall_offset
2450+ compiz_expo_windows_on_viewport)
2451Index: ubuntu/plugins/expo/src/windows_on_viewport/CMakeLists.txt
2452===================================================================
2453--- /dev/null 1970-01-01 00:00:00.000000000 +0000
2454+++ ubuntu/plugins/expo/src/windows_on_viewport/CMakeLists.txt 2012-09-08 11:51:33.107328243 +0800
2455@@ -0,0 +1,36 @@
2456+include_directories (
2457+ ${CMAKE_CURRENT_SOURCE_DIR}/include
2458+ ${CMAKE_CURRENT_SOURCE_DIR}/src
2459+ ${COMPIZ_INCLUDE_DIRS}
2460+ ${COMPIZ_EXPO_PLUGIN_SOURCE_DIR}
2461+ ${Boost_INCLUDE_DIRS}
2462+ ${GLIBMM_INCLUDE_DIRS}
2463+)
2464+
2465+link_directories (${GLIBMM_LIBRARY_DIRS} ${COMPIZ_LIBRARY_DIRS})
2466+
2467+set (
2468+ PRIVATE_HEADERS
2469+ ${CMAKE_CURRENT_SOURCE_DIR}/include/windows-on-viewport.h
2470+)
2471+
2472+set (
2473+ SRCS
2474+ ${CMAKE_CURRENT_SOURCE_DIR}/src/windows-on-viewport.cpp
2475+)
2476+
2477+add_library (
2478+ compiz_expo_windows_on_viewport STATIC
2479+ ${SRCS}
2480+ ${PRIVATE_HEADERS}
2481+)
2482+
2483+if (COMPIZ_BUILD_TESTING)
2484+ add_subdirectory ( ${CMAKE_CURRENT_SOURCE_DIR}/tests )
2485+endif (COMPIZ_BUILD_TESTING)
2486+
2487+target_link_libraries (
2488+ compiz_expo_windows_on_viewport
2489+ compiz_window_geometry
2490+ compiz_core
2491+)
2492Index: ubuntu/plugins/expo/src/windows_on_viewport/include/windows-on-viewport.h
2493===================================================================
2494--- /dev/null 1970-01-01 00:00:00.000000000 +0000
2495+++ ubuntu/plugins/expo/src/windows_on_viewport/include/windows-on-viewport.h 2012-09-08 15:17:24.196573992 +0800
2496@@ -0,0 +1,40 @@
2497+/**
2498+ * Copyright © 2012 Canonical Ltd.
2499+ *
2500+ * Authors:
2501+ * Sam Spilsbury <sam.spilsbury@canonical.com>
2502+ *
2503+ * This program is free software; you can redistribute it and/or
2504+ * modify it under the terms of the GNU General Public License
2505+ * as published by the Free Software Foundation; either version 2
2506+ * of the License, or (at your option) any later version.
2507+ *
2508+ * This program is distributed in the hope that it will be useful,
2509+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2510+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2511+ * GNU General Public License for more details.
2512+ *
2513+ **/
2514+#ifndef _COMPIZ_EXPO_WINDOWS_ON_VIEWPORT_H
2515+#define _COMPIZ_EXPO_WINDOWS_ON_VIEWPORT_H
2516+
2517+#include <core/point.h>
2518+#include <core/size.h>
2519+#include <core/rect.h>
2520+#include "client-list-generator.h"
2521+
2522+namespace compiz
2523+{
2524+ namespace expo
2525+ {
2526+ unsigned int countViewports (const CompSize &vpSize);
2527+
2528+ void activeViewportsForMembers (compiz::expo::ClientListGenerator &clientList,
2529+ const CompPoint &cursor,
2530+ const CompSize &vpSize,
2531+ const CompSize &screenSize,
2532+ std::vector <bool> &viewportActiveStates);
2533+ }
2534+}
2535+
2536+#endif
2537Index: ubuntu/plugins/expo/src/windows_on_viewport/src/windows-on-viewport.cpp
2538===================================================================
2539--- /dev/null 1970-01-01 00:00:00.000000000 +0000
2540+++ ubuntu/plugins/expo/src/windows_on_viewport/src/windows-on-viewport.cpp 2012-09-08 15:19:23.513165649 +0800
2541@@ -0,0 +1,80 @@
2542+/**
2543+ * Copyright © 2012 Canonical Ltd.
2544+ *
2545+ * Authors:
2546+ * Sam Spilsbury <sam.spilsbury@canonical.com>
2547+ *
2548+ * This program is free software; you can redistribute it and/or
2549+ * modify it under the terms of the GNU General Public License
2550+ * as published by the Free Software Foundation; either version 2
2551+ * of the License, or (at your option) any later version.
2552+ *
2553+ * This program is distributed in the hope that it will be useful,
2554+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2555+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2556+ * GNU General Public License for more details.
2557+ *
2558+ **/
2559+#include <cstdio>
2560+#include <algorithm>
2561+#include "windows-on-viewport.h"
2562+#include "viewport-member-window.h"
2563+
2564+namespace compiz
2565+{
2566+ namespace expo
2567+ {
2568+ unsigned int countViewports (const CompSize &vpSize)
2569+ {
2570+ return vpSize.width () * vpSize.height ();
2571+ }
2572+
2573+ void fillInNewViewportActiveData (unsigned int vpCount,
2574+ std::vector <bool> &vpActive)
2575+ {
2576+ if (vpActive.size () < vpCount)
2577+ {
2578+ unsigned int last = vpActive.size () - 1;
2579+ vpActive.resize (vpCount);
2580+ for (unsigned int i = last; i < vpActive.size (); i++)
2581+ vpActive[i] = false;
2582+ }
2583+ }
2584+
2585+ void activeViewportsForMembers (compiz::expo::ClientListGenerator &clientList,
2586+ const CompPoint &cursor,
2587+ const CompSize &vpSize,
2588+ const CompSize &screenSize,
2589+ std::vector <bool> &viewportActiveStates)
2590+ {
2591+ compiz::expo::ViewportMemberWindow *vpMemberWindow = clientList.nextClient ();
2592+
2593+ fillInNewViewportActiveData (countViewports (vpSize), viewportActiveStates);
2594+ std::fill_n (viewportActiveStates.begin (), viewportActiveStates.size (), false);
2595+
2596+ while (vpMemberWindow)
2597+ {
2598+ if (!vpMemberWindow->isDesktopOrDock ())
2599+ {
2600+ CompPoint viewport;
2601+
2602+ /* If this is a dragged window, use the cursor position */
2603+ if (vpMemberWindow->dragged ())
2604+ viewport.set (cursor.x () / screenSize.width (),
2605+ cursor.y () / screenSize.height ());
2606+ else
2607+ {
2608+ const compiz::window::Geometry &geom = vpMemberWindow->absoluteGeometry ();
2609+ viewport.set (geom.centerX () / screenSize.width (),
2610+ geom.centerY () / screenSize.height ());
2611+ }
2612+
2613+ unsigned int vpIndex = vpSize.width () * viewport.y () + viewport.x ();
2614+ viewportActiveStates[vpIndex] = true;
2615+ }
2616+
2617+ vpMemberWindow = clientList.nextClient ();
2618+ }
2619+ }
2620+ }
2621+}
2622Index: ubuntu/plugins/expo/src/windows_on_viewport/tests/CMakeLists.txt
2623===================================================================
2624--- /dev/null 1970-01-01 00:00:00.000000000 +0000
2625+++ ubuntu/plugins/expo/src/windows_on_viewport/tests/CMakeLists.txt 2012-09-08 15:06:24.481302659 +0800
2626@@ -0,0 +1,22 @@
2627+if (NOT GTEST_FOUND)
2628+ message ("Google Test not found - cannot build tests!")
2629+ set (COMPIZ_BUILD_TESTING OFF)
2630+endif (NOT GTEST_FOUND)
2631+
2632+include_directories (${GTEST_INCLUDE_DIRS})
2633+include_directories (${CMAKE_EXPO_PLUGIN_SOURCE_DIR})
2634+
2635+link_directories (${COMPIZ_LIBRARY_DIRS})
2636+
2637+add_executable (compiz_test_expo_windows_on_viewport
2638+ ${CMAKE_CURRENT_SOURCE_DIR}/test-windows-on-viewport.cpp)
2639+
2640+target_link_libraries (compiz_test_expo_windows_on_viewport
2641+ compiz_expo_windows_on_viewport
2642+ ${GTEST_BOTH_LIBRARIES}
2643+ ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
2644+ ${GMOCK_LIBRARY}
2645+ ${GMOCK_MAIN_LIBRARY}
2646+ )
2647+
2648+compiz_discover_tests (compiz_test_expo_windows_on_viewport COVERAGE compiz_expo_windows_on_viewport)
2649Index: ubuntu/plugins/expo/src/windows_on_viewport/tests/test-windows-on-viewport.cpp
2650===================================================================
2651--- /dev/null 1970-01-01 00:00:00.000000000 +0000
2652+++ ubuntu/plugins/expo/src/windows_on_viewport/tests/test-windows-on-viewport.cpp 2012-09-08 15:30:17.600409104 +0800
2653@@ -0,0 +1,149 @@
2654+/*
2655+ * Copyright © 2012 Canonical Ltd.
2656+ *
2657+ * Permission to use, copy, modify, distribute, and sell this software
2658+ * and its documentation for any purpose is hereby granted without
2659+ * fee, provided that the above copyright notice appear in all copies
2660+ * and that both that copyright notice and this permission notice
2661+ * appear in supporting documentation, and that the name of
2662+ * Canonical Ltd. not be used in advertising or publicity pertaining to
2663+ * distribution of the software without specific, written prior permission.
2664+ * Canonical Ltd. makes no representations about the suitability of this
2665+ * software for any purpose. It is provided "as is" without express or
2666+ * implied warranty.
2667+ *
2668+ * CANONICAL, LTD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
2669+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
2670+ * NO EVENT SHALL CANONICAL, LTD. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
2671+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
2672+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
2673+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
2674+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2675+ *
2676+ * Authored by: Sam Spilsbury <sam.spilsbury@canonical.com>
2677+ */
2678+#include <gtest/gtest.h>
2679+#include <gmock/gmock.h>
2680+#include "windows-on-viewport.h"
2681+#include "client-list-generator.h"
2682+#include "viewport-member-window.h"
2683+
2684+using ::testing::InSequence;
2685+using ::testing::Return;
2686+using ::testing::ReturnNull;
2687+using ::testing::ReturnRef;
2688+
2689+namespace
2690+{
2691+ namespace ce = compiz::expo;
2692+
2693+ class MockViewportMemberWindow :
2694+ public ce::ViewportMemberWindow
2695+ {
2696+ public:
2697+
2698+ MOCK_CONST_METHOD0 (absoluteGeometry, const compiz::window::Geometry & ());
2699+ MOCK_CONST_METHOD0 (isDesktopOrDock, bool ());
2700+ MOCK_CONST_METHOD0 (dragged, bool ());
2701+ };
2702+
2703+ class MockClientListGenerator :
2704+ public ce::ClientListGenerator
2705+ {
2706+ public:
2707+
2708+ MOCK_METHOD0 (nextClient, ce::ViewportMemberWindow * ());
2709+ };
2710+}
2711+
2712+class ExpoWindowsOnViewportTest :
2713+ public ::testing::Test
2714+{
2715+ protected:
2716+
2717+ MockClientListGenerator mockClientListGenerator;
2718+ std::vector <bool> activeStates;
2719+};
2720+
2721+namespace
2722+{
2723+ const CompSize vpSize (2, 2);
2724+ const CompSize screenSize (1000, 1000);
2725+}
2726+
2727+TEST_F (ExpoWindowsOnViewportTest, TestNoDocksMakeViewportsActive)
2728+{
2729+ MockViewportMemberWindow mockViewportMembers[1];
2730+ InSequence s;
2731+
2732+ EXPECT_CALL (mockClientListGenerator, nextClient ()).WillOnce (Return (&mockViewportMembers[0]));
2733+ EXPECT_CALL (mockViewportMembers[0], isDesktopOrDock ()).WillOnce (Return (true));
2734+ EXPECT_CALL (mockClientListGenerator, nextClient ()).WillOnce (ReturnNull ());
2735+
2736+ compiz::expo::activeViewportsForMembers (mockClientListGenerator,
2737+ CompPoint (1, 1),
2738+ vpSize,
2739+ screenSize,
2740+ activeStates);
2741+
2742+ ASSERT_EQ (activeStates.size (), vpSize.width () * vpSize.height ());
2743+ EXPECT_EQ (activeStates[0], false);
2744+ EXPECT_EQ (activeStates[1], false);
2745+ EXPECT_EQ (activeStates[2], false);
2746+ EXPECT_EQ (activeStates[3], false);
2747+}
2748+
2749+TEST_F (ExpoWindowsOnViewportTest, TestGrabbedWindowUsesCursorPosition)
2750+{
2751+ MockViewportMemberWindow mockViewportMembers[1];
2752+ InSequence s;
2753+
2754+ EXPECT_CALL (mockClientListGenerator, nextClient ()).WillOnce (Return (&mockViewportMembers[0]));
2755+ EXPECT_CALL (mockViewportMembers[0], isDesktopOrDock ()).WillOnce (Return (false));
2756+ EXPECT_CALL (mockViewportMembers[0], dragged ()).WillOnce (Return (true));
2757+ EXPECT_CALL (mockClientListGenerator, nextClient ()).WillOnce (ReturnNull ());
2758+
2759+ compiz::expo::activeViewportsForMembers (mockClientListGenerator,
2760+ CompPoint (screenSize.width () * 1.5,
2761+ screenSize.height () * 1.5),
2762+ vpSize,
2763+ screenSize,
2764+ activeStates);
2765+
2766+ ASSERT_EQ (activeStates.size (), vpSize.width () * vpSize.height ());
2767+ EXPECT_EQ (activeStates[0], false);
2768+ EXPECT_EQ (activeStates[1], false);
2769+ EXPECT_EQ (activeStates[2], false);
2770+ EXPECT_EQ (activeStates[3], true); // 2,2 has the cursor of a dragged window
2771+}
2772+
2773+TEST_F (ExpoWindowsOnViewportTest, TestUngrabbedWindowUsesGeometry)
2774+{
2775+ MockViewportMemberWindow mockViewportMembers[1];
2776+ InSequence s;
2777+
2778+ compiz::window::Geometry vpMemberGeometry1 (screenSize.width () * 1.1,
2779+ screenSize.height () * 1.1,
2780+ screenSize.width () / 2,
2781+ screenSize.height () / 2,
2782+ 0);
2783+
2784+ EXPECT_CALL (mockClientListGenerator, nextClient ()).WillOnce (Return (&mockViewportMembers[0]));
2785+ EXPECT_CALL (mockViewportMembers[0], isDesktopOrDock ()).WillOnce (Return (false));
2786+ EXPECT_CALL (mockViewportMembers[0], dragged ()).WillOnce (Return (false));
2787+ EXPECT_CALL (mockViewportMembers[0], absoluteGeometry ()).WillOnce (ReturnRef (vpMemberGeometry1));
2788+ EXPECT_CALL (mockClientListGenerator, nextClient ()).WillOnce (ReturnNull ());
2789+
2790+ compiz::expo::activeViewportsForMembers (mockClientListGenerator,
2791+ CompPoint (screenSize.width () * 1.5,
2792+ screenSize.height () * 1.5),
2793+ vpSize,
2794+ screenSize,
2795+ activeStates);
2796+
2797+ ASSERT_EQ (activeStates.size (), vpSize.width () * vpSize.height ());
2798+ EXPECT_EQ (activeStates[0], false);
2799+ EXPECT_EQ (activeStates[1], false);
2800+ EXPECT_EQ (activeStates[2], false);
2801+ EXPECT_EQ (activeStates[3], true); // 2,2 has a window on it
2802+}
2803Index: ubuntu/plugins/expo/src/client-list-generator.h
2804===================================================================
2805--- /dev/null 1970-01-01 00:00:00.000000000 +0000
2806+++ ubuntu/plugins/expo/src/client-list-generator.h 2012-09-08 11:51:33.111328267 +0800
2807@@ -0,0 +1,45 @@
2808+/*
2809+ * Copyright © 2012 Canonical Ltd.
2810+ *
2811+ * Permission to use, copy, modify, distribute, and sell this software
2812+ * and its documentation for any purpose is hereby granted without
2813+ * fee, provided that the above copyright notice appear in all copies
2814+ * and that both that copyright notice and this permission notice
2815+ * appear in supporting documentation, and that the name of
2816+ * Canonical Ltd. not be used in advertising or publicity pertaining to
2817+ * distribution of the software without specific, written prior permission.
2818+ * Canonical Ltd. makes no representations about the suitability of this
2819+ * software for any purpose. It is provided "as is" without express or
2820+ * implied warranty.
2821+ *
2822+ * CANONICAL, LTD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
2823+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
2824+ * NO EVENT SHALL CANONICAL, LTD. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
2825+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
2826+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
2827+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
2828+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2829+ *
2830+ * Authored by: Sam Spilsbury <sam.spilsbury@canonical.com>
2831+ */
2832+#ifndef _COMPIZ_EXPO_CLIENT_LIST_GENERATOR_H
2833+#define _COMPIZ_EXPO_CLIENT_LIST_GENERATOR_H
2834+
2835+namespace compiz
2836+{
2837+ namespace expo
2838+ {
2839+ class ViewportMemberWindow;
2840+
2841+ class ClientListGenerator
2842+ {
2843+ public:
2844+
2845+ virtual ~ClientListGenerator () {};
2846+ virtual ViewportMemberWindow * nextClient () = 0;
2847+ };
2848+ }
2849+}
2850+#endif
2851+
2852+
2853Index: ubuntu/plugins/expo/src/viewport-member-window.h
2854===================================================================
2855--- /dev/null 1970-01-01 00:00:00.000000000 +0000
2856+++ ubuntu/plugins/expo/src/viewport-member-window.h 2012-09-08 13:58:19.753047547 +0800
2857@@ -0,0 +1,46 @@
2858+/*
2859+ * Copyright © 2012 Canonical Ltd.
2860+ *
2861+ * Permission to use, copy, modify, distribute, and sell this software
2862+ * and its documentation for any purpose is hereby granted without
2863+ * fee, provided that the above copyright notice appear in all copies
2864+ * and that both that copyright notice and this permission notice
2865+ * appear in supporting documentation, and that the name of
2866+ * Canonical Ltd. not be used in advertising or publicity pertaining to
2867+ * distribution of the software without specific, written prior permission.
2868+ * Canonical Ltd. makes no representations about the suitability of this
2869+ * software for any purpose. It is provided "as is" without express or
2870+ * implied warranty.
2871+ *
2872+ * CANONICAL, LTD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
2873+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
2874+ * NO EVENT SHALL CANONICAL, LTD. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
2875+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
2876+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
2877+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
2878+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2879+ *
2880+ * Authored by: Sam Spilsbury <sam.spilsbury@canonical.com>
2881+ */
2882+#ifndef _COMPIZ_EXPO_VIEWPORT_MEMBER_WINDOW_H
2883+#define _COMPIZ_EXPO_VIEWPORT_MEMBER_WINDOW_H
2884+
2885+#include <core/windowgeometry.h>
2886+
2887+namespace compiz
2888+{
2889+ namespace expo
2890+ {
2891+ class ViewportMemberWindow
2892+ {
2893+ public:
2894+
2895+ virtual ~ViewportMemberWindow () {};
2896+ virtual const compiz::window::Geometry & absoluteGeometry () const = 0;
2897+ virtual bool dragged () const = 0;
2898+ virtual bool isDesktopOrDock () const = 0;
2899+ };
2900+ }
2901+}
2902+
2903+#endif
02904
=== modified file 'debian/patches/series'
--- debian/patches/series 2012-06-19 11:22:48 +0000
+++ debian/patches/series 2012-09-11 08:44:21 +0000
@@ -6,3 +6,4 @@
6ccsm_add_first_run_warning.patch6ccsm_add_first_run_warning.patch
7ccsm_disable_unity_checkbox.patch7ccsm_disable_unity_checkbox.patch
899_valid_ccsm_desktop_file.patch899_valid_ccsm_desktop_file.patch
9100_expo_layout.patch
910
=== modified file 'gtk/gnome/50-compiz-launchers.xml.in'
--- gtk/gnome/50-compiz-launchers.xml.in 2012-08-15 14:09:32 +0000
+++ gtk/gnome/50-compiz-launchers.xml.in 2012-09-11 08:44:21 +0000
@@ -1,6 +1,6 @@
1<?xml version="1.0" encoding="UTF-8"?>1<?xml version="1.0" encoding="UTF-8"?>
2<KeyListEntries schema="org.compiz.integrated" wm_name="Compiz" group="system" _name="Launchers" package="compiz">2<KeyListEntries schema="org.compiz.integrated" wm_name="Compiz" group="system" _name="Launchers" package="compiz">
33
4 <KeyListEntry name="exec" _description="Launch Terminal"/>4 <KeyListEntry name="run-command-terminal" _description="Launch Terminal"/>
55
6</KeyListEntries>6</KeyListEntries>
77
=== modified file 'gtk/window-decorator/CMakeLists.txt'
--- gtk/window-decorator/CMakeLists.txt 2012-05-24 00:55:17 +0000
+++ gtk/window-decorator/CMakeLists.txt 2012-09-11 08:44:21 +0000
@@ -23,34 +23,99 @@
23 ${COMPIZ_LINK_DIRS}23 ${COMPIZ_LINK_DIRS}
24 )24 )
2525
26 add_library (gtk_window_decorator_settings_interface STATIC
27 ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-interface.c)
28
29 add_library (gtk_window_decorator_settings STATIC
30 ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings.c)
31
32 add_library (gtk_window_decorator_settings_storage_interface STATIC
33 ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-storage-interface.c)
34
35 add_library (gtk_window_decorator_settings_storage_xproperty_interface STATIC
36 ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-xproperty-interface.c)
37
38 add_library (gtk_window_decorator_settings_writable_interface STATIC
39 ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-writable-interface.c)
40
41 add_library (gtk_window_decorator_settings_notified_interface
42 ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-notified-interface.c)
43
44 set (GTK_WINDOW_DECORATOR_ADDITIONAL_LIBRARIES
45 gtk_window_decorator_settings_notified_interface
46 gtk_window_decorator_settings_interface
47 gtk_window_decorator_settings_writable_interface
48 gtk_window_decorator_settings
49 gtk_window_decorator_settings_storage_interface
50 gtk_window_decorator_settings_storage_xproperty_interface)
51
26 if (USE_GCONF)52 if (USE_GCONF)
27 set (gwd_schema ${CMAKE_CURRENT_BINARY_DIR}/gwd.schemas)53 set (gwd_schema ${CMAKE_CURRENT_BINARY_DIR}/gwd.schemas)
28 compiz_translate_xml (54 compiz_translate_xml (
29 ${CMAKE_CURRENT_SOURCE_DIR}/gwd.schemas.in55 ${CMAKE_CURRENT_SOURCE_DIR}/gwd.schemas.in
30 ${gwd_schema}56 ${gwd_schema}
31 )57 )
32 compiz_install_gconf_schema (${CMAKE_CURRENT_BINARY_DIR}/gwd.schemas ${SCHEMADIR})58 compiz_install_gconf_schema (${CMAKE_CURRENT_BINARY_DIR}/gwd.schemas ${SCHEMADIR})
59 add_library (gtk_window_decorator_settings_storage_gconf STATIC
60 ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-storage-gconf.c)
61 list (APPEND GTK_WINDOW_DECORATOR_ADDITIONAL_LIBRARIES
62 gtk_window_decorator_settings_storage_gconf)
33 endif (USE_GCONF)63 endif (USE_GCONF)
3464
65 if (USE_GSETTINGS)
66 add_definitions (-DUSE_GSETTINGS)
67 add_library (gtk_window_decorator_settings_storage_gsettings STATIC
68 ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-storage-gsettings.c)
69
70 compiz_pkg_check_modules (GSETTINGS gio-2.0 glib-2.0)
71
72 target_link_libraries (gtk_window_decorator_settings_storage_gsettings
73 ${GSETTINGS_LIBRARIES})
74
75 list (APPEND GTK_WINDOW_DECORATOR_ADDITIONAL_LIBRARIES
76 gtk_window_decorator_settings_storage_gsettings)
77
78 set (_gwd_gschema_name org.compiz.gwd)
79 set (_gwd_gschema_filename ${_gwd_gschema_name}.gschema.xml)
80 set (_gwd_gschema_filepath ${CMAKE_CURRENT_SOURCE_DIR}/${_gwd_gschema_filename})
81 set (_gwd_gschema_generated_location ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/${_gwd_gschema_filename})
82 set (_gwd_gschema_dest ${CMAKE_INSTALL_PREFIX}/share/glib-2.0/schemas/)
83
84 add_custom_command (OUTPUT ${_gwd_gschema_generated_location}
85 COMMAND cp -r ${_gwd_gschema_filepath} ${_gwd_gschema_generated_location}
86 DEPENDS ${_gwd_gschema_filepath}
87 VERBATIM)
88
89 add_custom_target (compiz_gwd_gsettings_org_compiz_gwd_schema ALL
90 DEPENDS ${_gwd_gschema_generated_location})
91
92 add_gsettings_schema_to_recompilation_list (compiz_gwd_gsettings_org_compiz_gwd_schema)
93
94 compiz_install_gsettings_schema (${_gwd_gschema_generated_location}
95 ${_gwd_gschema_dest})
96 endif (USE_GSETTINGS)
97
35 add_executable (gtk-window-decorator98 add_executable (gtk-window-decorator
36 gtk-window-decorator.c99 gtk-window-decorator.c
37 blurprops.c100 blurprops.c
38 decorprops.c101 decorprops.c
39 cairo.c102 cairo.c
40 frames.c103 frames.c
41 gdk.c104 gdk.c
42 switcher.c105 switcher.c
43 metacity.c106 metacity.c
44 events.c107 events.c
45 forcequit.c108 forcequit.c
46 tooltip.c109 tooltip.c
47 actionmenu.c110 actionmenu.c
48 settings.c111 settings.c
49 util.c112 util.c
50 style.c113 style.c
51 wnck.c114 wnck.c
52 decorator.c115 decorator.c
53 ${gwd_schema}116 ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-xproperty-storage.c
117 ${CMAKE_CURRENT_SOURCE_DIR}/gwd-settings-notified.c
118 ${gwd_schema}
54 )119 )
55120
56 add_dependencies (gtk-window-decorator decoration)121 add_dependencies (gtk-window-decorator decoration)
@@ -67,6 +132,7 @@
67 ${GCONF_LIBRARIES}132 ${GCONF_LIBRARIES}
68 ${DBUS_GLIB_LIBRARIES}133 ${DBUS_GLIB_LIBRARIES}
69 ${metacitylibs}134 ${metacitylibs}
135 ${GTK_WINDOW_DECORATOR_ADDITIONAL_LIBRARIES}
70 )136 )
71137
72 install (138 install (
@@ -74,6 +140,9 @@
74 DESTINATION ${exec_prefix}140 DESTINATION ${exec_prefix}
75 )141 )
76142
143 if (COMPIZ_BUILD_TESTING)
144 add_subdirectory (tests)
145 endif (COMPIZ_BUILD_TESTING)
77146
78endif (USE_GTK)147endif (USE_GTK)
79148
80149
=== modified file 'gtk/window-decorator/blurprops.c'
--- gtk/window-decorator/blurprops.c 2011-02-21 09:53:08 +0000
+++ gtk/window-decorator/blurprops.c 2012-09-11 08:44:21 +0000
@@ -37,14 +37,17 @@
37 Display *xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());37 Display *xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
38 long *data = NULL;38 long *data = NULL;
39 int size = 0;39 int size = 0;
40 gint blur_type;
41
42 g_object_get (settings, "blur", &blur_type, NULL);
40 43
41 if (settings->blur_type != BLUR_TYPE_ALL)44 if (blur_type != BLUR_TYPE_ALL)
42 {45 {
43 bottom_region = NULL;46 bottom_region = NULL;
44 left_region = NULL;47 left_region = NULL;
45 right_region = NULL;48 right_region = NULL;
46 49
47 if (settings->blur_type != BLUR_TYPE_TITLEBAR)50 if (blur_type != BLUR_TYPE_TITLEBAR)
48 top_region = NULL;51 top_region = NULL;
49 }52 }
5053
5154
=== modified file 'gtk/window-decorator/cairo.c'
--- gtk/window-decorator/cairo.c 2012-08-13 05:46:59 +0000
+++ gtk/window-decorator/cairo.c 2012-09-11 08:44:21 +0000
@@ -354,7 +354,7 @@
354 {354 {
355 decor_color_t *title_color = _title_color;355 decor_color_t *title_color = _title_color;
356356
357 alpha = settings->decoration_alpha + 0.3;357 alpha = decoration_alpha + 0.3;
358358
359 fill_rounded_rectangle (cr,359 fill_rounded_rectangle (cr,
360 x1 + 0.5,360 x1 + 0.5,
@@ -386,7 +386,7 @@
386 }386 }
387 else387 else
388 {388 {
389 alpha = settings->decoration_alpha;389 alpha = decoration_alpha;
390390
391 fill_rounded_rectangle (cr,391 fill_rounded_rectangle (cr,
392 x1 + 0.5,392 x1 + 0.5,
393393
=== modified file 'gtk/window-decorator/decorator.c'
--- gtk/window-decorator/decorator.c 2012-05-27 11:25:24 +0000
+++ gtk/window-decorator/decorator.c 2012-09-11 08:44:21 +0000
@@ -118,7 +118,11 @@
118static const PangoFontDescription *118static const PangoFontDescription *
119get_titlebar_font (decor_frame_t *frame)119get_titlebar_font (decor_frame_t *frame)
120{120{
121 if (settings->use_system_font)121 const gchar *titlebar_font;
122 g_object_get (settings, "titlebar-font", &titlebar_font, NULL);
123
124 /* Using system font */
125 if (!titlebar_font)
122 return NULL;126 return NULL;
123 else127 else
124 return frame->titlebar_font;128 return frame->titlebar_font;
@@ -773,12 +777,12 @@
773 /* create shadow from opaque decoration777 /* create shadow from opaque decoration
774 * FIXME: Should not modify settings value778 * FIXME: Should not modify settings value
775 * like this */779 * like this */
776 save_decoration_alpha = settings->decoration_alpha;780 save_decoration_alpha = decoration_alpha;
777 settings->decoration_alpha = 1.0;781 decoration_alpha = 1.0;
778782
779 (*d.draw) (&d);783 (*d.draw) (&d);
780784
781 settings->decoration_alpha = save_decoration_alpha;785 decoration_alpha = save_decoration_alpha;
782786
783 XRenderFillRectangle (xdisplay, PictOpSrc, picture, &white,787 XRenderFillRectangle (xdisplay, PictOpSrc, picture, &white,
784 c->left_space,788 c->left_space,
@@ -1034,45 +1038,25 @@
1034cairo_get_shadow (decor_frame_t *d, decor_shadow_options_t *opts, gboolean active)1038cairo_get_shadow (decor_frame_t *d, decor_shadow_options_t *opts, gboolean active)
1035{1039{
1036 if (active)1040 if (active)
1037 {1041 g_object_get (settings, "active-shadow", &opts, NULL);
1038 memcpy (opts->shadow_color, settings->active_shadow_color, sizeof (settings->active_shadow_color));
1039 opts->shadow_radius = settings->active_shadow_radius;
1040 opts->shadow_offset_x = settings->active_shadow_offset_x;
1041 opts->shadow_offset_y = settings->active_shadow_offset_y;
1042 opts->shadow_opacity = settings->active_shadow_opacity;
1043 }
1044 /* TODO: Inactive shadows */
1045 else1042 else
1046 {1043 g_object_get (settings, "inactive-shadow", &opts, NULL);
1047 memcpy (opts->shadow_color, settings->inactive_shadow_color, sizeof (settings->inactive_shadow_color));
1048 opts->shadow_radius = settings->inactive_shadow_radius;
1049 opts->shadow_offset_x = settings->inactive_shadow_offset_x;
1050 opts->shadow_offset_y = settings->inactive_shadow_offset_y;
1051 opts->shadow_opacity = settings->inactive_shadow_opacity;
1052 }
1053}1044}
10541045
1055void1046void
1056meta_get_shadow (decor_frame_t *frame, decor_shadow_options_t *opts, gboolean active)1047meta_get_shadow (decor_frame_t *frame, decor_shadow_options_t *opts, gboolean active)
1057{1048{
1049 decor_shadow_options_t *setting_opts = NULL;
1050
1058 if (active)1051 if (active)
1059 {1052 g_object_get (settings, "active-shadow", &setting_opts, NULL);
1060 memcpy (opts->shadow_color, settings->active_shadow_color, sizeof (settings->active_shadow_color));
1061 opts->shadow_radius = settings->active_shadow_radius;
1062 opts->shadow_offset_x = settings->active_shadow_offset_x;
1063 opts->shadow_offset_y = settings->active_shadow_offset_y;
1064 opts->shadow_opacity = settings->active_shadow_opacity;
1065 }
1066 /* TODO: Inactive shadows */
1067 else1053 else
1054 g_object_get (settings, "inactive-shadow", &setting_opts, NULL);
1055
1056 if (setting_opts)
1068 {1057 {
1069 memcpy (opts->shadow_color, settings->inactive_shadow_color, sizeof (settings->inactive_shadow_color));1058 memcpy (opts, setting_opts, sizeof (decor_shadow_options_t));
1070 opts->shadow_radius = settings->inactive_shadow_radius;
1071 opts->shadow_offset_x = settings->inactive_shadow_offset_x;
1072 opts->shadow_offset_y = settings->inactive_shadow_offset_y;
1073 opts->shadow_opacity = settings->inactive_shadow_opacity;
1074 }1059 }
1075
1076}1060}
10771061
1078int1062int
10791063
=== modified file 'gtk/window-decorator/events.c'
--- gtk/window-decorator/events.c 2012-07-30 08:50:38 +0000
+++ gtk/window-decorator/events.c 2012-09-11 08:44:21 +0000
@@ -85,8 +85,11 @@
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: