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