Merge lp:~mc-return/compiz/compiz-WIP into lp:compiz/0.9.10

Proposed by MC Return
Status: Work in progress
Proposed branch: lp:~mc-return/compiz/compiz-WIP
Merge into: lp:compiz/0.9.10
Diff against target: 64269 lines (+17688/-15353) (has conflicts)
249 files modified
RELEASING (+1/-1)
compizconfig/ccsm/ccm/Settings.py (+1/-1)
metadata/core.xml.in (+1/-1)
plugins/addhelper/addhelper.xml.in (+3/-2)
plugins/addhelper/src/addhelper.cpp (+35/-31)
plugins/addhelper/src/addhelper.h (+10/-10)
plugins/animation/src/animation.cpp (+481/-330)
plugins/animation/src/curvedfold.cpp (+28/-22)
plugins/animation/src/dodge.cpp (+103/-67)
plugins/animation/src/dream.cpp (+15/-12)
plugins/animation/src/extensionplugin.cpp (+86/-54)
plugins/animation/src/fade.cpp (+4/-5)
plugins/animation/src/focusfade.cpp (+8/-7)
plugins/animation/src/glide.cpp (+11/-11)
plugins/animation/src/grid.cpp (+64/-47)
plugins/animation/src/horizontalfold.cpp (+22/-22)
plugins/animation/src/magiclamp.cpp (+58/-59)
plugins/animation/src/options.cpp (+155/-54)
plugins/animation/src/private.h (+284/-205)
plugins/animation/src/restack.cpp (+52/-35)
plugins/animation/src/rollup.cpp (+15/-13)
plugins/animation/src/transform.cpp (+6/-7)
plugins/animation/src/wave.cpp (+14/-10)
plugins/animation/src/zoomside.cpp (+48/-49)
plugins/animationaddon/src/airplane.cpp (+113/-102)
plugins/animationaddon/src/animationaddon.cpp (+23/-12)
plugins/animationaddon/src/beamup.cpp (+23/-22)
plugins/animationaddon/src/burn.cpp (+115/-112)
plugins/animationaddon/src/dissolve.cpp (+11/-6)
plugins/animationaddon/src/domino.cpp (+43/-16)
plugins/animationaddon/src/explode.cpp (+30/-28)
plugins/animationaddon/src/fold.cpp (+7/-8)
plugins/animationaddon/src/glide3.cpp (+9/-9)
plugins/animationaddon/src/leafspread.cpp (+12/-13)
plugins/animationaddon/src/particle.cpp (+16/-10)
plugins/animationaddon/src/polygon.cpp (+128/-82)
plugins/animationaddon/src/private.h (+258/-231)
plugins/animationaddon/src/skewer.cpp (+13/-8)
plugins/annotate/src/annotate.cpp (+287/-122)
plugins/bench/src/bench.cpp (+40/-34)
plugins/bench/src/bench.h (+24/-21)
plugins/bicubic/src/bicubic.cpp (+1/-1)
plugins/blur/src/blur.cpp (+48/-49)
plugins/blur/src/blur.h (+1/-0)
plugins/clone/src/clone.cpp (+70/-74)
plugins/clone/src/clone.h (+30/-25)
plugins/colorfilter/src/colorfilter.cpp (+57/-37)
plugins/colorfilter/src/colorfilter.h (+13/-17)
plugins/colorfilter/src/parser.cpp (+70/-69)
plugins/compiztoolbox/src/compiztoolbox.cpp (+102/-92)
plugins/composite/src/pixmapbinding/include/pixmapbinding.h (+12/-13)
plugins/composite/src/pixmapbinding/src/pixmapbinding.cpp (+6/-5)
plugins/composite/src/privates.h (+78/-57)
plugins/composite/src/screen.cpp (+75/-56)
plugins/composite/src/window.cpp (+46/-25)
plugins/copytex/src/copytex.cpp (+40/-29)
plugins/copytex/src/copytex.h (+21/-14)
plugins/crashhandler/src/crashhandler.cpp (+6/-4)
plugins/cube/src/cube.cpp (+298/-119)
plugins/cube/src/privates.h (+8/-0)
plugins/cubeaddon/src/cubeaddon.cpp (+396/-238)
plugins/cubeaddon/src/cubeaddon.h (+92/-63)
plugins/dbus/src/dbus.cpp (+475/-36)
plugins/decor/src/decor.cpp (+42/-36)
plugins/expo/src/expo.cpp (+68/-0)
plugins/extrawm/src/extrawm.cpp (+41/-40)
plugins/ezoom/ezoom.xml.in (+1/-1)
plugins/ezoom/src/ezoom.cpp (+315/-46)
plugins/fadedesktop/src/fadedesktop.cpp (+10/-20)
plugins/fadedesktop/src/fadedesktop.h (+16/-14)
plugins/firepaint/firepaint.xml.in (+33/-11)
plugins/firepaint/src/firepaint.cpp (+51/-8)
plugins/firepaint/src/firepaint.h (+3/-4)
plugins/freewins/src/action.cpp (+117/-129)
plugins/freewins/src/events.cpp (+22/-20)
plugins/freewins/src/freewins.h (+125/-103)
plugins/freewins/src/input.cpp (+37/-64)
plugins/freewins/src/paint.cpp (+105/-91)
plugins/freewins/src/util.cpp (+42/-45)
plugins/gears/gears.xml.in (+32/-0)
plugins/gears/src/gears.cpp (+122/-54)
plugins/gears/src/gears.h (+11/-10)
plugins/gnomecompat/src/gnomecompat.cpp (+3/-7)
plugins/grid/src/grabhandler/include/grabhandler.h (+2/-2)
plugins/grid/src/grid.cpp (+265/-68)
plugins/grid/src/grid.h (+12/-2)
plugins/group/src/glow.cpp (+1/-1)
plugins/group/src/paint.cpp (+6/-1)
plugins/group/src/selection.cpp (+1/-1)
plugins/group/src/tab.cpp (+4/-4)
plugins/imgsvg/src/imgsvg.cpp (+8/-0)
plugins/kdecompat/src/kdecompat.cpp (+11/-6)
plugins/loginout/src/loginout.cpp (+6/-6)
plugins/mag/src/mag.cpp (+103/-92)
plugins/maximumize/src/maximumize.cpp (+93/-113)
plugins/maximumize/src/maximumize.h (+65/-65)
plugins/mblur/src/mblur.cpp (+9/-6)
plugins/move/src/move.cpp (+196/-31)
plugins/move/src/move.h (+37/-19)
plugins/neg/src/neg.cpp (+19/-20)
plugins/opengl/include/opengl/doublebuffer.h (+14/-8)
plugins/opengl/include/opengl/opengl.h (+142/-122)
plugins/opengl/include/opengl/program.h (+38/-16)
plugins/opengl/include/opengl/programcache.h (+2/-1)
plugins/opengl/include/opengl/texture.h (+11/-5)
plugins/opengl/include/opengl/vector.h (+6/-2)
plugins/opengl/src/blacklist/blacklist.cpp (+8/-6)
plugins/opengl/src/blacklist/blacklist.h (+4/-2)
plugins/opengl/src/doublebuffer/src/double-buffer.cpp (+2/-4)
plugins/opengl/src/framebufferobject.cpp (+26/-21)
plugins/opengl/src/fsregion/fsregion.cpp (+12/-7)
plugins/opengl/src/fsregion/fsregion.h (+10/-2)
plugins/opengl/src/matrix.cpp (+24/-22)
plugins/opengl/src/opengl.cpp (+12/-10)
plugins/opengl/src/paint.cpp (+241/-256)
plugins/opengl/src/privates.h (+100/-85)
plugins/opengl/src/privatetexture.h (+17/-6)
plugins/opengl/src/privatevertexbuffer.h (+47/-39)
plugins/opengl/src/program.cpp (+46/-36)
plugins/opengl/src/programcache.cpp (+29/-34)
plugins/opengl/src/screen.cpp (+544/-449)
plugins/opengl/src/shadercache.cpp (+53/-47)
plugins/opengl/src/texture.cpp (+70/-61)
plugins/opengl/src/vector.cpp (+35/-33)
plugins/opengl/src/vertexbuffer.cpp (+108/-106)
plugins/opengl/src/window.cpp (+53/-44)
plugins/place/src/constrain-to-workarea/src/constrain-to-workarea.cpp (+21/-10)
plugins/place/src/place.cpp (+233/-230)
plugins/place/src/screen-size-change/src/screen-size-change.cpp (+10/-5)
plugins/place/src/screen-size-change/tests/screen-size-change/src/test-place-screen-size-change.cpp (+282/-1)
plugins/place/src/smart/src/smart.cpp (+2/-1)
plugins/put/src/put.cpp (+291/-245)
plugins/regex/src/regex.cpp (+27/-26)
plugins/regex/src/regexplugin.h (+5/-2)
plugins/resize/src/composite-screen-impl.h (+1/-1)
plugins/resize/src/composite-window-impl.h (+2/-0)
plugins/resize/src/gl-screen-impl.h (+3/-1)
plugins/resize/src/gl-window-impl.h (+2/-0)
plugins/resize/src/logic/include/resize-logic.h (+72/-55)
plugins/resize/src/logic/include/resize-window-interface.h (+3/-1)
plugins/resize/src/logic/src/resize-logic.cpp (+236/-241)
plugins/resize/src/logic/tests/test-logic.cpp (+1/-1)
plugins/resize/src/property-writer-impl.h (+3/-1)
plugins/resize/src/resize-window-impl.h (+5/-1)
plugins/resize/src/resize.cpp (+49/-25)
plugins/resize/src/resize.h (+21/-10)
plugins/resize/src/window-impl.h (+13/-9)
plugins/resizeinfo/src/resizeinfo.cpp (+121/-49)
plugins/ring/src/ring.cpp (+30/-5)
plugins/rotate/src/rotate.cpp (+187/-65)
plugins/rotate/src/rotate.h (+17/-6)
plugins/scale/scale.xml.in (+1/-1)
plugins/scale/src/scale.cpp (+205/-213)
plugins/scaleaddon/src/scaleaddon.cpp (+41/-6)
plugins/scalefilter/src/scalefilter.cpp (+1/-1)
plugins/screenshot/src/screenshot.cpp (+538/-223)
plugins/screenshot/src/screenshot.h (+14/-3)
plugins/session/src/session.cpp (+36/-56)
plugins/shelf/src/shelf.h (+33/-27)
plugins/shift/src/shift.cpp (+293/-66)
plugins/shift/src/shift.h (+11/-0)
plugins/showdesktop/showdesktop.xml.in (+15/-3)
plugins/showdesktop/src/showdesktop.cpp (+114/-102)
plugins/showdesktop/src/showdesktop.h (+35/-30)
plugins/showmouse/src/showmouse.cpp (+147/-118)
plugins/showrepaint/src/showrepaint.cpp (+5/-1)
plugins/snap/src/snap.cpp (+127/-101)
plugins/snap/src/snap.h (+85/-38)
plugins/splash/splash.xml.in (+11/-3)
plugins/splash/src/splash.cpp (+195/-191)
plugins/splash/src/splash.h (+38/-32)
plugins/stackswitch/src/stackswitch.cpp (+55/-11)
plugins/stackswitch/stackswitch.xml.in (+9/-2)
plugins/staticswitcher/src/staticswitcher.cpp (+230/-224)
plugins/staticswitcher/src/staticswitcher.h (+81/-48)
plugins/switcher/src/switcher.cpp (+15/-3)
plugins/td/src/3d.cpp (+104/-128)
plugins/td/src/3d.h (+25/-25)
plugins/text/include/text/text.h (+4/-3)
plugins/text/src/text.cpp (+3/-0)
plugins/thumbnail/thumbnail.xml.in (+1/-1)
plugins/trailfocus/src/trailfocus.cpp (+44/-54)
plugins/trailfocus/src/trailfocus.h (+2/-0)
plugins/trip/src/trip.cpp (+4/-4)
plugins/vpswitch/src/vpswitch.cpp (+40/-48)
plugins/vpswitch/src/vpswitch.h (+14/-13)
plugins/wall/src/offset_movement/include/offset-movement.h (+1/-1)
plugins/wall/src/offset_movement/src/offset-movement.cpp (+6/-6)
plugins/wall/src/wall.cpp (+304/-225)
plugins/wall/src/wall.h (+118/-26)
plugins/wall/wall.xml.in (+0/-4)
plugins/wallpaper/src/wallpaper.cpp (+8/-1)
plugins/water/src/water.cpp (+58/-48)
plugins/water/src/water.h (+46/-39)
plugins/widget/src/widget.cpp (+3/-1)
plugins/winrules/src/winrules.cpp (+46/-44)
plugins/winrules/src/winrules.h (+9/-9)
plugins/wizard/include/wizard_tex.h (+0/-2827)
plugins/wizard/src/wizard.cpp (+399/-196)
plugins/wobbly/src/wobbly.cpp (+298/-193)
plugins/wobbly/src/wobbly.h (+110/-66)
plugins/wobbly/wobbly.xml.in (+8/-0)
plugins/workarounds/src/workarounds.cpp (+228/-256)
plugins/workarounds/src/workarounds.h (+54/-46)
plugins/workspacenames/src/workspacenames.cpp (+34/-5)
plugins/workspacenames/workspacenames.xml.in (+55/-1)
src/asyncserverwindow.h (+4/-0)
src/atoms.cpp (+43/-82)
src/configurerequestbuffer-impl.h (+7/-3)
src/configurerequestbuffer.cpp (+30/-30)
src/event.cpp (+1453/-1448)
src/eventmanagement.h (+0/-2)
src/global.cpp (+5/-5)
src/main.cpp (+23/-37)
src/match.cpp (+89/-53)
src/modifierhandler.cpp (+25/-43)
src/option.cpp (+67/-39)
src/option/tests/option.cpp (+1/-1)
src/plugin.cpp (+71/-59)
src/pluginclasshandler/include/core/pluginclasshandler.h (+4/-4)
src/pluginclasshandler/src/pluginclasses.cpp (+1/-1)
src/pluginclasshandler/src/valueholder.cpp (+3/-15)
src/point/src/point.cpp (+4/-3)
src/privateaction.h (+7/-6)
src/privateeventsource.h (+3/-3)
src/privateiosource.h (+11/-8)
src/privatematch.h (+17/-6)
src/privateoption.h (+10/-6)
src/privatescreen.h (+265/-212)
src/propertywriter.cpp (+70/-74)
src/rect/src/rect.cpp (+46/-58)
src/region/src/region.cpp (+31/-22)
src/screen.cpp (+773/-770)
src/stackdebugger.cpp (+8/-15)
src/string/src/string.cpp (+7/-11)
src/string/tests/printf/src/test-string-printf.cpp (+1/-1)
src/timer/src/timeouthandler.cpp (+4/-8)
src/timer/src/timer.cpp (+24/-10)
src/timer/tests/callbacks/src/test-timer-callbacks.cpp (+2/-2)
src/window.cpp (+104/-2)
src/window/constrainment/include/core/windowconstrainment.h (+2/-2)
src/window/constrainment/src/windowconstrainment.cpp (+19/-16)
src/window/extents/src/windowextents.cpp (+22/-0)
src/window/geometry-saver/src/geometrysaver.cpp (+4/-2)
src/window/geometry/src/windowgeometry.cpp (+12/-10)
src/windowgeometry.cpp (+14/-26)
src/wrapsystem/tests/test-wrapsystem.cpp (+6/-6)
tests/integration/xig/src/test-runner.c (+10/-10)
tests/system/xorg-gtest/tests/compiz_xorg_gtest_configure_window.cpp (+98/-0)
Text conflict in plugins/animation/src/animation.cpp
Text conflict in plugins/animation/src/curvedfold.cpp
Text conflict in plugins/animation/src/dodge.cpp
Text conflict in plugins/animation/src/dream.cpp
Text conflict in plugins/animation/src/extensionplugin.cpp
Text conflict in plugins/animation/src/grid.cpp
Text conflict in plugins/animation/src/horizontalfold.cpp
Text conflict in plugins/animation/src/magiclamp.cpp
Text conflict in plugins/animation/src/options.cpp
Text conflict in plugins/animation/src/rollup.cpp
Text conflict in plugins/animation/src/wave.cpp
Text conflict in plugins/animationaddon/src/animationaddon.cpp
Text conflict in plugins/annotate/src/annotate.cpp
Text conflict in plugins/clone/src/clone.cpp
Text conflict in plugins/colorfilter/src/colorfilter.cpp
Text conflict in plugins/compiztoolbox/src/compiztoolbox.cpp
Text conflict in plugins/composite/src/screen.cpp
Text conflict in plugins/composite/src/window.cpp
Text conflict in plugins/cube/src/cube.cpp
Text conflict in plugins/cube/src/privates.h
Text conflict in plugins/cubeaddon/src/cubeaddon.cpp
Text conflict in plugins/dbus/src/dbus.cpp
Text conflict in plugins/expo/src/expo.cpp
Text conflict in plugins/extrawm/src/extrawm.cpp
Text conflict in plugins/ezoom/src/ezoom.cpp
Text conflict in plugins/firepaint/firepaint.xml.in
Text conflict in plugins/firepaint/src/firepaint.cpp
Text conflict in plugins/gears/src/gears.cpp
Text conflict in plugins/grid/src/grid.cpp
Text conflict in plugins/grid/src/grid.h
Text conflict in plugins/imgsvg/src/imgsvg.cpp
Text conflict in plugins/kdecompat/src/kdecompat.cpp
Text conflict in plugins/move/src/move.cpp
Text conflict in plugins/move/src/move.h
Text conflict in plugins/opengl/include/opengl/opengl.h
Text conflict in plugins/opengl/src/fsregion/fsregion.cpp
Text conflict in plugins/opengl/src/fsregion/fsregion.h
Text conflict in plugins/opengl/src/paint.cpp
Text conflict in plugins/opengl/src/screen.cpp
Text conflict in plugins/opengl/src/window.cpp
Text conflict in plugins/place/src/constrain-to-workarea/src/constrain-to-workarea.cpp
Text conflict in plugins/place/src/place.cpp
Text conflict in plugins/place/src/screen-size-change/src/screen-size-change.cpp
Text conflict in plugins/place/src/screen-size-change/tests/screen-size-change/src/test-place-screen-size-change.cpp
Text conflict in plugins/put/src/put.cpp
Text conflict in plugins/resize/src/resize.cpp
Text conflict in plugins/resizeinfo/src/resizeinfo.cpp
Text conflict in plugins/ring/src/ring.cpp
Text conflict in plugins/rotate/src/rotate.cpp
Text conflict in plugins/rotate/src/rotate.h
Text conflict in plugins/scale/src/scale.cpp
Text conflict in plugins/scaleaddon/src/scaleaddon.cpp
Text conflict in plugins/screenshot/src/screenshot.cpp
Text conflict in plugins/screenshot/src/screenshot.h
Text conflict in plugins/shift/src/shift.cpp
Text conflict in plugins/shift/src/shift.h
Text conflict in plugins/showdesktop/showdesktop.xml.in
Text conflict in plugins/showmouse/src/showmouse.cpp
Text conflict in plugins/stackswitch/src/stackswitch.cpp
Text conflict in plugins/staticswitcher/src/staticswitcher.cpp
Text conflict in plugins/switcher/src/switcher.cpp
Text conflict in plugins/wall/src/wall.cpp
Text conflict in plugins/wall/src/wall.h
Text conflict in plugins/wallpaper/src/wallpaper.cpp
Conflict: can't delete plugins/wizard/include because it is not empty.  Not deleting.
Conflict because plugins/wizard/include is not versioned, but has versioned children.  Versioned directory.
Contents conflict in plugins/wizard/include/wizard.h
Text conflict in plugins/wizard/src/wizard.cpp
Text conflict in plugins/wobbly/src/wobbly.cpp
Text conflict in plugins/workarounds/src/workarounds.cpp
Text conflict in plugins/workspacenames/src/workspacenames.cpp
Text conflict in plugins/workspacenames/workspacenames.xml.in
Text conflict in src/event.cpp
Text conflict in src/plugin.cpp
Text conflict in src/screen.cpp
Text conflict in src/window.cpp
Text conflict in src/window/extents/src/windowextents.cpp
To merge this branch: bzr merge lp:~mc-return/compiz/compiz-WIP
Reviewer Review Type Date Requested Status
Compiz Maintainers Pending
Review via email: mp+156679@code.launchpad.net

Commit message

WIP

To post a comment you must log in.
lp:~mc-return/compiz/compiz-WIP updated
3674. By MC Return

compiztoolbox.cpp:
Cleanup

3675. By MC Return

screen.cpp:
Cleanup

3676. By MC Return

composite window.cpp:
Cleanup

3677. By MC Return

extrawm.cpp:
Cleanup

3678. By MC Return

ezoom.cpp:
Cleanup

3679. By MC Return

fade.cpp:
Cleanup

3680. By MC Return

fade.h:
Added newlines for better readability

3681. By MC Return

Removed useless brackets

3682. By MC Return

gnomecompat.cpp:
Cleanup

3683. By MC Return

compiztoolbox.cpp:
Readded needed brackets

3684. By MC Return

bench.cpp:
Cleanup

3685. By MC Return

imgpng.cpp:
Cleanup

3686. By MC Return

dbus.cpp:
Cleanup

3687. By MC Return

session.cpp:
Cleanup

3688. By MC Return

session.cpp:
Cleanup

3689. By MC Return

screen.cpp:
Removed redundant bracket

3690. By MC Return

src/actions.cpp:
Removed redundant brackets
Declare and assign variables in one line

3691. By MC Return

wall.cpp:
Removed redundant brackets

3692. By MC Return

thumbnail.cpp:
Removed redundant brackets
Fixed a typo in a comment

3693. By MC Return

scale.cpp:
Declare and assign variables in one line
Removed redundant brackets

3694. By MC Return

rotate.cpp:
Declare and assign local variables in one line

3695. By MC Return

decor.cpp:
Removed redundant brackets

3696. By MC Return

expo.cpp:
Tell grid when viewport change is in progress.
(Thanks and credits for this go to Sami Jaktholm)

Removed redundant brackets

3697. By MC Return

Merged latest lp:compiz

3698. By MC Return

Grid:
Prevent center and corner gridded windows from jumping viewports.
(Thanks and credits for this go to Sami Jaktholm)

Prevent top and bottom gridded windows from jumping viewports by
making those semi-maximize horizontally.

Those are actually semi-maximized horizontally, so we will treat
them as such and let core handle the restoring, just like we
already do for semi-maximized vertically grid windows (left/right).

Now "Strg+Super+Down" will restore top and bottom gridded windows
correctly as well.

Also multiple gridding to top, bottom, left or right will not
overwrite the stored original size anymore.

Restore windows also when workspace switcher is active.
(Thanks and credits for this go to Sami Jaktholm)

Allow cycling for all gridded windows if explicitly specified by the
user in CCSM.

Forbid cycling through different sizes for corner and center-gridded
windows also per default, now fully fixing bug #878820 and following
the design specification by Ayatana Design there, making behaviour
consistent.

Grid xml:
Added cycle_sizes bool option, which allows the user to choose the
prefered behaviour (fixed versus flexible sizes on multiple presses
on the same grid keyboard shortcut).
Default of this option is off, cycling disabled as specified by design.

Added punctuation where missing and removed it where usually is none.
Fixed typos, improved description and titles.

Expo:
Tell grid when viewport change is in progress.
(Thanks and credits for this go to Sami Jaktholm)

Move:
Attention: There is no possibility to drag off horizontally resized
windows yet, the fix for this problem is proposed separately.

(fixes: LP: #878820, LP: #879218, LP: #882754 and LP: #1082001,
 partially fixes: #1116538, #1164332)

3699. By MC Return

Move plugin:

Implemented strategy to snap off horizontally semi-maximized windows by
dragging them along the x axis.

Declare and assign variables in one line to improve readability and reduce
code size.

(LP: #1165198)

3700. By MC Return

Cube-addon (Cube Reflection and Deformation):

If the user disables "Draw top face"/"Draw bottom face"
we do not want to draw anything (LP: #1162484).

The original, non-deformed caps will only work for the
non-deformed cube, so we can just use the original function
in that case.

We need to clear the texture if no texture files are
specified in "Image files", otherwise the old texture
would still be drawn, even if all image files are
removed (LP: #1162711).

Now we will default back and use the cube cap
colors and opacities defined in the "Desktop Cube" plugin
(if "Draw top/bottom face" are enabled only, see above).

This way the user can choose between (for top/bottom):

1. Do not draw a cube cap face at all
   ("Draw top/bottom face" option disabled)
2. Use color and opacity specified in "Desktop Cube"
   (empty images list)
3. Use a texture for the cap
   (image is in the list, which is default)

Removed redundant mCurrent = mCurrent % mFiles.size ();
calculation, this has already been done:
cap->mCurrent = (cap->mCurrent + change + count) % count;

count and change both need to be != 0 for mCurrent to change.

Fixed indentation, removed redundant brackets and newlines,
declaration and assignment of local variables in one line,
if possible, minor cleanup.

(LP: #1162484, LP: #1162711)

3701. By MC Return

Stack (Window) Switcher
(currently excluded from compilation):

Fixed window title drawn although "Show Window Title" is disabled.

(LP: #1070782)

3702. By MC Return

Grid:
We want to use the same functionality like the unmaximize_or_minimize_window
shortcut normally provides, so if our window has not been touched by grid, we
will do the same with that window that core would normally do.
(please see src/actions.cpp, unmaximizeOrMinimizeWin)

Note: If we use the same shortcut for unmaximize_or_minimize_window_key (core)
and put_restore_key (grid), core will take over again, if grid gets disabled.
If grid is enabled the unmaximize_or_minimize_window_key will be overridden,
because core always loads first and grid later and just the (now enhanced) grid
restore function will be called.

Also note that this commit did not change any shortcut yet, but just provides
the functionality for grid - Please use your grid restore keybinding like you
would use the unmaximize_or_minimize_window_key normally for now.

(LP: #1116538)

3703. By MC Return

expo.cpp:
Fixed remaining merge conflict

3704. By MC Return

plugins/opengl/src/paint.cpp:
Removed redundant brackets

3705. By MC Return

plugins/opengl/src/paint.cpp:
Fixed a few typos in a comment
Simplified a if-else block

3706. By MC Return

plugins/opengl/src/window.cpp:
Fixed typos in a comment

3707. By MC Return

plugins/opengl/src/vertexbuffer.cpp:
Removed redundant brackets

3708. By MC Return

plugins/opengl/src/texture.cpp:
Removed redundant brackets

3709. By MC Return

plugins/opengl/src/shadercache.cpp:
Fixed indentation

3710. By MC Return

plugins/opengl/src/screen.cpp:
Cleanup

3711. By MC Return

plugins/opengl/src/programcache.cpp:
Simplified a few if-else blocks

3712. By MC Return

plugins/opengl/src/...
Minor cleanup

3713. By MC Return

plugins/composite/src/window.cpp:
Removed redundant newlines

3714. By MC Return

plugins/composite/src/screen.cpp:
Minor cleanup

3715. By MC Return

plugins/workarounds/src/workarounds.cpp:
Use C++ bool (true/false)
Minor cleanup

3716. By MC Return

plugins/screenshot/src/screenshot.h:
Use C++ bool for mGrab

3717. By MC Return

plugins/freewins/src/paint.cpp:
Use C++ bool (true/false)

3718. By MC Return

plugins/workarounds/src/workarounds.cpp:
Cleanup

3719. By MC Return

plugins/workarounds/src/workarounds.cpp:
Fixed compilation after cleanup

3720. By MC Return

plugins/wall/src/wall.cpp:
Cleanup

3721. By MC Return

plugins/shift/src/shift.cpp:
Cleanup

3722. By MC Return

plugins/put/src/put.cpp:
Cleanup

3723. By MC Return

plugins/wobbly/src/wobbly.cpp:
Cleanup

3724. By MC Return

src/window.cpp:
Cleanup

3725. By MC Return

src/stackdebugger.cpp:
Cleanup

3726. By MC Return

Freewins:
Cleanup

3727. By MC Return

Grid:
Cleanup

3728. By MC Return

Move:
Cleanup and latest version

3729. By MC Return

Merged latest lp:compiz and fixed conflicts

3730. By MC Return

*Resizeinfo, xml changes:

Added option for bold/normal font, default is still bold.

Added option to change the font size (10-14), default is still 12
pixel.

Enhanced and corrected a few tooltips.

*Resizeinfo, code changes:

Choose between PANGO_WEIGHT_BOLD and PANGO_WEIGHT_NORMAL.

Use individual font size specified by the user in CCSM.

Fixed computation of wrong damageRegion, it was additionally adding
the window size, making it way too large.

Removed useless declaration of int width and height.

Declaration and assignment of local variables in one line, if possible.

Minor indentation fixes.

(LP: #1166195, LP: #1166196 and LP: #1166245)

3731. By MC Return

Merged latest lp:compiz

3732. By MC Return

*MAJOR* Advancement and Cleanup

3733. By MC Return

Reversed ABI checking logic

3734. By MC Return

Multiple major and minor fixes and optimizations

3735. By MC Return

Fixed some OpenGL plugin issues

3736. By MC Return

Update with a lot of fixes

3737. By MC Return

More work

3738. By MC Return

Latest fixes update

3739. By MC Return

ccp upgrade

3740. By MC Return

Moving on...

3741. By MC Return

Massive, multiple improvements

3742. By MC Return

More...

3743. By MC Return

Multiple additional improvements

3744. By MC Return

More...

3745. By MC Return

More...

3746. By MC Return

Update

3747. By MC Return

More...

3748. By MC Return

Removed useless files

3749. By MC Return

More...

3750. By MC Return

More...

3751. By MC Return

More...

3752. By MC Return

More (but also some regressions) -> this is experimental

3753. By MC Return

More changes

3754. By MC Return

More

3755. By MC Return

Huge screen.cpp cleanup

3756. By MC Return

More src/screen.cpp fixes

3757. By MC Return

Cubeaddon and other improvements

3758. By MC Return

Massive cleanup

3759. By MC Return

Fixes

3760. By MC Return

Initialize!

3761. By MC Return

Initialize!

3762. By MC Return

Initialize!

3763. By MC Return

More

3764. By MC Return

Changes

3765. By MC Return

EZoom improvements

Unmerged revisions

3765. By MC Return

EZoom improvements

3764. By MC Return

Changes

3763. By MC Return

More

3762. By MC Return

Initialize!

3761. By MC Return

Initialize!

3760. By MC Return

Initialize!

3759. By MC Return

Fixes

3758. By MC Return

Massive cleanup

3757. By MC Return

Cubeaddon and other improvements

3756. By MC Return

More src/screen.cpp fixes

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'RELEASING'
2--- RELEASING 2012-05-16 17:40:13 +0000
3+++ RELEASING 2013-07-21 23:03:28 +0000
4@@ -47,7 +47,7 @@
5 * Check that no release exists with the current version
6 * Verify that make distcheck completes successfully
7 * Generate the final tar file
8- * Generate an sha1sum file
9+ * Generate a sha1sum file
10 * Sign the sha1sum using your GPG setup (asks for your GPG password)
11 * scp the three files to appear on
12 http://xorg.freedesktop.org/archive/individual/app
13
14=== modified file 'compizconfig/ccsm/ccm/Settings.py'
15--- compizconfig/ccsm/ccm/Settings.py 2013-05-13 13:32:59 +0000
16+++ compizconfig/ccsm/ccm/Settings.py 2013-07-21 23:03:28 +0000
17@@ -1475,7 +1475,7 @@
18 self.Widget = gtk.Frame()
19 self.Expander = gtk.Expander(name)
20 self.Widget.add(self.Expander)
21- self.Expander.set_expanded(False)
22+ self.Expander.set_expanded(True)
23 self.Child = gtk.VBox()
24 self.Expander.add(self.Child)
25
26
27=== modified file 'compizconfig/gsettings/tests/test_gsettings_tests.cpp'
28=== modified file 'gtk/window-decorator/events.c'
29=== modified file 'gtk/window-decorator/metacity.c'
30=== modified file 'kde/window-decorator-kde4/window.cpp'
31=== modified file 'metadata/core.xml.in'
32--- metadata/core.xml.in 2013-01-29 23:38:49 +0000
33+++ metadata/core.xml.in 2013-07-21 23:03:28 +0000
34@@ -2,7 +2,7 @@
35 <compiz>
36 <plugin name="core" useBcop="true">
37 <_short>General Options</_short>
38- <_long>General compiz options</_long>
39+ <_long>I am the mighty core - nothing works without me</_long>
40 <options>
41 <option name="active_plugins" type="list">
42 <_short>Active Plugins</_short>
43
44=== modified file 'plugins/addhelper/addhelper.xml.in'
45--- plugins/addhelper/addhelper.xml.in 2012-10-15 10:31:51 +0000
46+++ plugins/addhelper/addhelper.xml.in 2013-07-21 23:03:28 +0000
47@@ -13,6 +13,7 @@
48 <plugin>opengl</plugin>
49 <plugin>fade</plugin>
50 <plugin>decor</plugin>
51+ <plugin>obs</plugin>
52 </relation>
53 </deps>
54 <options>
55@@ -40,7 +41,7 @@
56 <_short>Brightness</_short>
57 <_long>Brightness of faded windows</_long>
58 <default>30</default>
59- <min>1</min>
60+ <min>0</min>
61 <max>100</max>
62 </option>
63 <option name="saturation" type="int">
64@@ -54,7 +55,7 @@
65 <_short>Opacity</_short>
66 <_long>Opacity of faded windows</_long>
67 <default>100</default>
68- <min>1</min>
69+ <min>0</min>
70 <max>100</max>
71 </option>
72 </group>
73
74=== modified file 'plugins/addhelper/src/addhelper.cpp'
75--- plugins/addhelper/src/addhelper.cpp 2013-05-09 13:43:07 +0000
76+++ plugins/addhelper/src/addhelper.cpp 2013-07-21 23:03:28 +0000
77@@ -35,7 +35,6 @@
78 * the windows, including the active. Otherwise, it will dim
79 * and reset the active.
80 */
81-
82 void
83 AddScreen::walkWindows ()
84 {
85@@ -48,17 +47,13 @@
86
87 aw->dim = false;
88
89- if (!isToggle)
90- continue;
91-
92- if (w->id () == screen->activeWindow ())
93- continue;
94-
95- if (w->invisible () || w->destroyed () ||
96- !w->isMapped () || w->minimized ())
97- continue;
98-
99- if (!optionGetWindowTypes ().evaluate (w))
100+ if (!isToggle ||
101+ w->id () == screen->activeWindow () ||
102+ w->invisible () ||
103+ w->destroyed () ||
104+ !w->isMapped () ||
105+ w->minimized () ||
106+ !optionGetWindowTypes ().evaluate (w))
107 continue;
108
109 aw->cWindow->addDamage ();
110@@ -72,7 +67,7 @@
111 */
112 bool
113 AddWindow::glPaint (const GLWindowPaintAttrib &attrib,
114- const GLMatrix &transform,
115+ const GLMatrix &transform,
116 const CompRegion &region,
117 unsigned int mask)
118 {
119@@ -84,7 +79,7 @@
120 GLWindowPaintAttrib wAttrib = attrib;
121
122 /* applies the lowest value */
123- wAttrib.opacity = (MIN (attrib.opacity, as->opacity));
124+ wAttrib.opacity = (MIN (attrib.opacity, as->opacity));
125 wAttrib.brightness = (MIN (attrib.brightness, as->brightness));
126 wAttrib.saturation = (MIN (attrib.saturation, as->saturation));
127
128@@ -92,10 +87,8 @@
129 return gWindow->glPaint (wAttrib, transform, region, mask);
130 }
131 else
132- {
133 /* the window is not dimmed, so it's painted normal */
134 return gWindow->glPaint (attrib, transform, region, mask);
135- }
136 }
137
138 /* Takes the inital event.
139@@ -117,21 +110,23 @@
140
141 /* Takes the action and toggles us.
142 */
143-
144 bool
145 AddScreen::toggle (CompAction *action,
146 CompAction::State state,
147 CompOption::Vector options)
148 {
149 isToggle = !isToggle;
150+
151 if (isToggle)
152 {
153 walkWindows ();
154+
155 foreach (CompWindow *w, screen->windows ())
156 {
157 ADD_WINDOW (w);
158 aw->gWindow->glPaintSetEnabled (aw, true);
159 }
160+
161 screen->handleEventSetEnabled (this, true);
162 }
163 else
164@@ -142,11 +137,11 @@
165 aw->gWindow->glPaintSetEnabled (aw, false);
166 aw->cWindow->addDamage ();
167 }
168+
169 screen->handleEventSetEnabled (this, false);
170 }
171
172 return true;
173-
174 }
175
176 void
177@@ -156,24 +151,30 @@
178 switch (num)
179 {
180 case AddhelperOptions::Brightness:
181- brightness = (optionGetBrightness () * 0xffff) / 100;
182- break;
183+ brightness = (optionGetBrightness () * BRIGHT) / 100;
184+// break;
185+
186 case AddhelperOptions::Saturation:
187- saturation = (optionGetSaturation () * 0xffff) / 100;
188- break;
189+ saturation = (optionGetSaturation () * COLOR) / 100;
190+// break;
191+
192 case AddhelperOptions::Opacity:
193- opacity = (optionGetOpacity () * 0xffff) / 100;
194+ opacity = (optionGetOpacity () * OPAQUE) / 100;
195 break;
196+
197 case AddhelperOptions::Ononinit: // <- Turn AddHelper on on initiation
198 isToggle = optionGetOnoninit ();
199+
200 if (isToggle)
201 {
202 walkWindows ();
203+
204 foreach (CompWindow *w, screen->windows ())
205 {
206 ADD_WINDOW (w);
207 aw->gWindow->glPaintSetEnabled (aw, true);
208 }
209+
210 screen->handleEventSetEnabled (this, true);
211 }
212 else
213@@ -183,9 +184,11 @@
214 ADD_WINDOW (w);
215 aw->gWindow->glPaintSetEnabled (aw, false);
216 }
217+
218 screen->handleEventSetEnabled (this, false);
219 }
220 break;
221+
222 default:
223 break;
224 }
225@@ -205,8 +208,9 @@
226 if (as->isToggle)
227 {
228 if (window->id () != screen->activeWindow () &&
229- !window->overrideRedirect ())
230+ !window->overrideRedirect ())
231 dim = true;
232+
233 gWindow->glPaintSetEnabled (this, true);
234 }
235 }
236@@ -220,26 +224,26 @@
237 AddScreen::AddScreen (CompScreen *screen) :
238 PluginClassHandler <AddScreen, CompScreen> (screen),
239 cScreen (CompositeScreen::get (screen)),
240- opacity ((optionGetOpacity () * 0xffff) / 100),
241- brightness ((optionGetBrightness () * 0xffff) / 100),
242- saturation ((optionGetSaturation () * 0xffff) / 100),
243+ opacity ((optionGetOpacity () * OPAQUE) / 100),
244+ brightness ((optionGetBrightness () * BRIGHT) / 100),
245+ saturation ((optionGetSaturation () * COLOR) / 100),
246 isToggle (optionGetOnoninit ())
247 {
248 ScreenInterface::setHandler (screen, false);
249
250 optionSetToggleKeyInitiate (boost::bind (&AddScreen::toggle, this,
251- _1, _2, _3));
252+ _1, _2, _3));
253
254 optionSetBrightnessNotify (boost::bind (&AddScreen::optionChanged, this, _1,
255 _2));
256 optionSetSaturationNotify (boost::bind (&AddScreen::optionChanged, this, _1,
257 _2));
258 optionSetOpacityNotify (boost::bind (&AddScreen::optionChanged, this, _1,
259- _2));
260+ _2));
261 optionSetOnoninitNotify (boost::bind (&AddScreen::optionChanged, this, _1,
262- _2));
263+ _2));
264 }
265-
266+
267 bool
268 AddPluginVTable::init ()
269 {
270
271=== modified file 'plugins/addhelper/src/addhelper.h'
272--- plugins/addhelper/src/addhelper.h 2012-09-04 15:33:44 +0000
273+++ plugins/addhelper/src/addhelper.h 2013-07-21 23:03:28 +0000
274@@ -39,15 +39,16 @@
275 public AddhelperOptions
276 {
277 public:
278+
279 AddScreen (CompScreen *screen);
280
281- CompositeScreen *cScreen;
282-
283- GLushort opacity;
284- GLushort brightness;
285- GLushort saturation;
286-
287- bool isToggle;
288+ CompositeScreen *cScreen;
289+
290+ GLushort opacity;
291+ GLushort brightness;
292+ GLushort saturation;
293+
294+ bool isToggle;
295
296 void
297 handleEvent (XEvent *event);
298@@ -63,8 +64,6 @@
299 void
300 optionChanged (CompOption *options,
301 AddhelperOptions::Options num);
302-
303-
304 };
305
306 class AddWindow :
307@@ -72,6 +71,7 @@
308 public GLWindowInterface
309 {
310 public:
311+
312 AddWindow (CompWindow *window);
313 ~AddWindow ();
314
315@@ -85,7 +85,7 @@
316 glPaint (const GLWindowPaintAttrib &,
317 const GLMatrix &,
318 const CompRegion &,
319- unsigned int );
320+ unsigned int );
321 };
322
323 class AddPluginVTable :
324
325=== modified file 'plugins/animation/src/animation.cpp'
326--- plugins/animation/src/animation.cpp 2013-05-26 06:15:47 +0000
327+++ plugins/animation/src/animation.cpp 2013-07-21 23:03:28 +0000
328@@ -97,17 +97,16 @@
329 public CompPlugin::VTableForScreenAndWindow<AnimScreen, AnimWindow, ANIMATION_ABI>
330 {
331 public:
332+
333 bool init ();
334 void fini ();
335 };
336
337 COMPIZ_PLUGIN_20090315 (animation, AnimPluginVTable);
338
339-static const unsigned short FAKE_ICON_SIZE = 4;
340-
341-const unsigned short LAST_ANIM_DIRECTION = 5;
342-
343-const unsigned short NUM_EFFECTS = 16;
344+static const unsigned short FAKE_ICON_SIZE = 4;
345+const unsigned short LAST_ANIM_DIRECTION = 5;
346+const unsigned short NUM_EFFECTS = 16;
347
348 const char *eventNames[AnimEventNum] =
349 {"Open", "Close", "Minimize", "Unminimize", "Shade", "Focus"};
350@@ -167,11 +166,12 @@
351 // provided by a plugin, otherwise set it to None.
352 void
353 PrivateAnimScreen::updateEventEffects (AnimEvent e,
354- bool forRandom,
355- bool callPost)
356+ bool forRandom,
357+ bool callPost)
358 {
359 CompOption::Value::Vector *listVal;
360 EffectSet *effectSet;
361+
362 if (forRandom)
363 {
364 listVal = &getOptions ()[(unsigned)randomEffectOptionIds[e]].value ().
365@@ -184,6 +184,7 @@
366 list ();
367 effectSet = &mEventEffects[e];
368 }
369+
370 unsigned int n = listVal->size ();
371
372 effectSet->effects.clear ();
373@@ -191,7 +192,7 @@
374
375 AnimEffectVector &eventEffectsAllowed = mEventEffectsAllowed[e];
376
377- for (unsigned int r = 0; r < n; r++) // for each row
378+ for (unsigned int r = 0; r < n; ++r) // for each row
379 {
380 const CompString &animName = (*listVal)[r].s ();
381
382@@ -208,7 +209,7 @@
383
384 if (callPost)
385 {
386- foreach (ExtensionPluginInfo *extPlugin, mExtensionPlugins)
387+ foreach (ExtensionPluginInfo *extPlugin, mExtensionPlugins)
388 extPlugin->postUpdateEventEffects (e, forRandom);
389 }
390 }
391@@ -227,21 +228,27 @@
392
393 bool
394 PrivateAnimScreen::isAnimEffectInList (AnimEffect theEffect,
395- EffectSet &effectList)
396+ EffectSet &effectList)
397 {
398 for (unsigned int i = 0; i < effectList.effects.size (); ++i)
399 if (effectList.effects[i] == theEffect)
400 return true;
401+
402 return false;
403 }
404
405 bool
406 PrivateAnimScreen::isAnimEffectPossibleForEvent (AnimEffect theEffect,
407- AnimEvent event)
408+ AnimEvent event)
409 {
410 // Check all rows to see if the effect is chosen there
411 unsigned int nRows = mEventEffects[event].effects.size ();
412- for (unsigned int i = 0; i < nRows; ++i)
413+<<<<<<< TREE
414+ for (unsigned int i = 0; i < nRows; ++i)
415+=======
416+
417+ for (unsigned int i = 0; i < nRows; ++i)
418+>>>>>>> MERGE-SOURCE
419 {
420 AnimEffect chosenEffect = mEventEffects[event].effects[i];
421 // if chosen directly
422@@ -253,6 +260,7 @@
423 isAnimEffectInList (theEffect, mRandomEffects[event]))
424 return true;
425 }
426+
427 return false;
428 }
429
430@@ -262,6 +270,7 @@
431 for (int e = 0; e < AnimEventNum; ++e)
432 if (isAnimEffectPossibleForEvent (theEffect, (AnimEvent)e))
433 return true;
434+
435 return false;
436 }
437
438@@ -275,9 +284,11 @@
439 {
440 AnimEffect chosenEffect = mEventEffects[(unsigned)AnimEventFocus].
441 effects[i];
442+
443 if (chosenEffect->isRestackAnim)
444 return true;
445 }
446+
447 return false;
448 }
449
450@@ -297,7 +308,7 @@
451
452 void
453 PrivateAnimScreen::addExtension (ExtensionPluginInfo *extensionPluginInfo,
454- bool shouldInitPersistentData)
455+ bool shouldInitPersistentData)
456 {
457 mExtensionPlugins.push_back (extensionPluginInfo);
458
459@@ -323,21 +334,29 @@
460 }
461 }
462
463- for (int e = 0; e < AnimEventNum; ++e)
464+<<<<<<< TREE
465+ for (int e = 0; e < AnimEventNum; ++e)
466+=======
467+ for (int e = 0; e < AnimEventNum; ++e)
468+ {
469+>>>>>>> MERGE-SOURCE
470 if (eventEffectsNeedUpdate[e])
471 {
472 updateEventEffects ((AnimEvent)e, false, false);
473+
474 if (e != AnimEventFocus)
475 updateEventEffects ((AnimEvent)e, true, false);
476 }
477+ }
478
479 if (shouldInitPersistentData)
480 {
481 const CompWindowList &pl = pushLockedPaintList ();
482+ AnimWindow *aw;
483 // Initialize persistent window data for the extension plugin
484 foreach (CompWindow *w, pl)
485 {
486- AnimWindow *aw = AnimWindow::get (w);
487+ aw = AnimWindow::get (w);
488 extensionPluginInfo->initPersistentData (aw);
489 }
490
491@@ -357,9 +376,12 @@
492 // Stop all ongoing animations
493 const CompWindowList &pl = pushLockedPaintList ();
494
495+ PrivateAnimWindow *aw;
496+
497 foreach (CompWindow *w, pl)
498 {
499- PrivateAnimWindow *aw = AnimWindow::get (w)->priv;
500+ aw = AnimWindow::get (w)->priv;
501+
502 if (aw->curAnimation ())
503 aw->postAnimationCleanUp ();
504 }
505@@ -380,7 +402,6 @@
506 if (extensionPluginInfo->nEffects == 0)
507 return; // no animation effects -> we're done here
508
509-
510 // Also delete the "allowed effect" entries for that plugin
511
512 for (int e = 0; e < AnimEventNum; ++e)
513@@ -409,6 +430,7 @@
514
515 // Update event effects to complete removal
516 updateEventEffects ((AnimEvent)e, false);
517+
518 if (e != AnimEventFocus)
519 updateEventEffects ((AnimEvent)e, true);
520 }
521@@ -425,11 +447,11 @@
522 popLockedPaintList ();
523 }
524
525-ExtensionPluginInfo::ExtensionPluginInfo (const CompString &name,
526- unsigned int nEffects,
527- AnimEffect *effects,
528+ExtensionPluginInfo::ExtensionPluginInfo (const CompString &name,
529+ unsigned int nEffects,
530+ AnimEffect *effects,
531 CompOption::Vector *effectOptions,
532- unsigned int firstEffectOptionIndex) :
533+ unsigned int firstEffectOptionIndex) :
534 name (name),
535 nEffects (nEffects),
536 effects (effects),
537@@ -440,11 +462,11 @@
538
539 // End of extension functions
540
541-Animation::Animation (CompWindow *w,
542- WindowEvent curWindowEvent,
543- float duration,
544+Animation::Animation (CompWindow *w,
545+ WindowEvent curWindowEvent,
546+ float duration,
547 const AnimEffect info,
548- const CompRect &icon) :
549+ const CompRect &icon) :
550 mWindow (w),
551 mAWindow (AnimWindow::get (w)),
552 mTotalTime (duration),
553@@ -461,11 +483,11 @@
554 if (curWindowEvent == WindowEventShade ||
555 curWindowEvent == WindowEventUnshade)
556 {
557- mDecorTopHeight = w->output ().top;
558+ mDecorTopHeight = w->output ().top;
559 mDecorBottomHeight = w->output ().bottom;
560 }
561
562- texturesCache = new GLTexture::List (GLWindow::get (w)->textures ());
563+ texturesCache = new GLTexture::List (GLWindow::get (w)->textures ());
564 PrivateAnimScreen *as = mAWindow->priv->paScreen ();
565
566 mTimestep = as->optionGetTimeStep ();
567@@ -494,26 +516,32 @@
568
569 switch (mCurWindowEvent) // the old event
570 {
571- case WindowEventOpen:
572- mCurWindowEvent = WindowEventClose;
573- break;
574- case WindowEventClose:
575- mCurWindowEvent = WindowEventOpen;
576- break;
577- case WindowEventMinimize:
578- mCurWindowEvent = WindowEventUnminimize;
579- break;
580- case WindowEventUnminimize:
581- mCurWindowEvent = WindowEventMinimize;
582- break;
583- case WindowEventShade:
584- mCurWindowEvent = WindowEventUnshade;
585- break;
586- case WindowEventUnshade:
587- mCurWindowEvent = WindowEventShade;
588- break;
589- default:
590- break;
591+ case WindowEventOpen:
592+ mCurWindowEvent = WindowEventClose;
593+ break;
594+
595+ case WindowEventClose:
596+ mCurWindowEvent = WindowEventOpen;
597+ break;
598+
599+ case WindowEventMinimize:
600+ mCurWindowEvent = WindowEventUnminimize;
601+ break;
602+
603+ case WindowEventUnminimize:
604+ mCurWindowEvent = WindowEventMinimize;
605+ break;
606+
607+ case WindowEventShade:
608+ mCurWindowEvent = WindowEventUnshade;
609+ break;
610+
611+ case WindowEventUnshade:
612+ mCurWindowEvent = WindowEventShade;
613+ break;
614+
615+ default:
616+ break;
617 }
618
619 // 1: forward, 2: backward (3 - progressDir is opposite direction)
620@@ -521,13 +549,14 @@
621
622 switch (mCurWindowEvent) // the new event
623 {
624- case WindowEventClose:
625- case WindowEventMinimize:
626- case WindowEventShade:
627- progressDir = 2;
628- break;
629- default:
630- break;
631+ case WindowEventClose:
632+ case WindowEventMinimize:
633+ case WindowEventShade:
634+ progressDir = 2;
635+ break;
636+
637+ default:
638+ break;
639 }
640
641 if (mOverrideProgressDir == 0)
642@@ -536,11 +565,11 @@
643 mOverrideProgressDir = 0; // disable override
644 }
645
646-PartialWindowAnim::PartialWindowAnim (CompWindow *w,
647- WindowEvent curWindowEvent,
648- float duration,
649+PartialWindowAnim::PartialWindowAnim (CompWindow *w,
650+ WindowEvent curWindowEvent,
651+ float duration,
652 const AnimEffect info,
653- const CompRect &icon) :
654+ const CompRect &icon) :
655 Animation::Animation (w, curWindowEvent, duration, info, icon),
656 mUseDrawRegion (false),
657 mDrawRegion ()
658@@ -574,8 +603,9 @@
659 getOptions ()[(unsigned)customOptionOptionIds[e]].value ();
660
661 unsigned int nRows = valMatch.list ().size ();
662- if (nRows != eventEffects->effects.size () ||
663- nRows != valDuration.list ().size () ||
664+
665+ if (nRows != eventEffects->effects.size () ||
666+ nRows != valDuration.list ().size () ||
667 nRows != valCustomOptions.list ().size ())
668 {
669 compLogMessage ("animation", CompLogLevelError,
670@@ -605,15 +635,16 @@
671
672 AnimEffect
673 PrivateAnimScreen::getActualEffect (AnimEffect effect,
674- AnimEvent animEvent)
675+ AnimEvent animEvent)
676 {
677- bool allRandom = optionGetAllRandom ();
678+ bool allRandom = optionGetAllRandom ();
679 AnimEffectVector *randomEffects = &mRandomEffects[animEvent].effects;
680- unsigned int nRandomEffects = randomEffects->size ();
681+ unsigned int nRandomEffects = randomEffects->size ();
682
683 if ((effect == AnimEffectRandom) || allRandom)
684 {
685 unsigned int nFirstRandomEffect = 0;
686+
687 if (nRandomEffects == 0) // no random animation selected, assume "all"
688 {
689 randomEffects = &mEventEffectsAllowed[animEvent];
690@@ -622,8 +653,10 @@
691 nFirstRandomEffect = 2;
692 nRandomEffects = randomEffects->size () - 2;
693 }
694+
695 unsigned int index = nFirstRandomEffect +
696 (unsigned int)(nRandomEffects * (double)rand () / RAND_MAX);
697+
698 return (*randomEffects)[index];
699 }
700 else
701@@ -634,12 +667,10 @@
702 /// to an actual direction (up, down, left, or right).
703 AnimDirection
704 Animation::getActualAnimDirection (AnimDirection dir,
705- bool openDir)
706+ bool openDir)
707 {
708 if (dir == AnimDirectionRandom)
709- {
710 dir = (AnimDirection)(rand () % 4);
711- }
712 else if (dir == AnimDirectionAuto)
713 {
714 CompRect outRect (mAWindow->savedRectsValid () ?
715@@ -647,8 +678,8 @@
716 mWindow->outputRect ());
717
718 // away from icon
719- int centerX = outRect.x () + outRect.width () / 2 ;
720- int centerY = outRect.y () + outRect.height () / 2 ;
721+ int centerX = outRect.centerX ();
722+ int centerY = outRect.centerY ();
723 float relDiffX = ((float)centerX - mIcon.x ()) / outRect.width ();
724 float relDiffY = ((float)centerY - mIcon.y ()) / outRect.height ();
725
726@@ -683,14 +714,13 @@
727 float
728 Animation::progressLinear ()
729 {
730- float forwardProgress =
731- 1 - mRemainingTime / (mTotalTime - mTimestep);
732- forwardProgress = MIN (forwardProgress, 1);
733- forwardProgress = MAX (forwardProgress, 0);
734+ float forwardProgress = 1 - mRemainingTime / (mTotalTime - mTimestep);
735+ forwardProgress = MIN (forwardProgress, 1);
736+ forwardProgress = MAX (forwardProgress, 0);
737
738- if (mCurWindowEvent == WindowEventOpen ||
739- mCurWindowEvent == WindowEventUnminimize ||
740- mCurWindowEvent == WindowEventUnshade ||
741+ if (mCurWindowEvent == WindowEventOpen ||
742+ mCurWindowEvent == WindowEventUnminimize ||
743+ mCurWindowEvent == WindowEventUnshade ||
744 mCurWindowEvent == WindowEventFocus)
745 forwardProgress = 1 - forwardProgress;
746
747@@ -700,19 +730,17 @@
748 float
749 Animation::progressEaseInEaseOut ()
750 {
751- float forwardProgress =
752- 1 - mRemainingTime / (mTotalTime - mTimestep);
753- forwardProgress = MIN (forwardProgress, 1);
754- forwardProgress = MAX (forwardProgress, 0);
755+ float forwardProgress = 1 - mRemainingTime / (mTotalTime - mTimestep);
756+ forwardProgress = MIN (forwardProgress, 1);
757+ forwardProgress = MAX (forwardProgress, 0);
758
759 // Apply sigmoid and normalize
760- forwardProgress =
761- (sigmoid (forwardProgress) - sigmoid (0)) /
762- (sigmoid (1) - sigmoid (0));
763+ forwardProgress = (sigmoid (forwardProgress) - sigmoid (0)) /
764+ (sigmoid (1) - sigmoid (0));
765
766- if (mCurWindowEvent == WindowEventOpen ||
767- mCurWindowEvent == WindowEventUnminimize ||
768- mCurWindowEvent == WindowEventUnshade ||
769+ if (mCurWindowEvent == WindowEventOpen ||
770+ mCurWindowEvent == WindowEventUnminimize ||
771+ mCurWindowEvent == WindowEventUnshade ||
772 mCurWindowEvent == WindowEventFocus)
773 forwardProgress = 1 - forwardProgress;
774
775@@ -725,7 +753,9 @@
776 /// where minx and maxx are the
777 /// starting and ending points on the sigmoid.
778 float
779-Animation::progressDecelerateCustom (float progress, float minx, float maxx)
780+Animation::progressDecelerateCustom (float progress,
781+ float minx,
782+ float maxx)
783 {
784 float x = 1 - progress;
785 float s = 8;
786@@ -770,16 +800,20 @@
787
788 if (source.x1 < target.x1)
789 target.x1 = source.x1;
790+
791 if (source.x2 > target.x2)
792 target.x2 = source.x2;
793+
794 if (source.y1 < target.y1)
795 target.y1 = source.y1;
796+
797 if (source.y2 > target.y2)
798 target.y2 = source.y2;
799 }
800
801 void
802-AnimWindow::expandBBWithPoint (float fx, float fy)
803+AnimWindow::expandBBWithPoint (float fx,
804+ float fy)
805 {
806 Box &target = priv->BB ();
807
808@@ -794,6 +828,7 @@
809 target.y2 = y + 1;
810 return;
811 }
812+
813 if (x < target.x1)
814 target.x1 = x;
815 else if (x > target.x2)
816@@ -817,14 +852,19 @@
817 }
818
819 static bool
820-project (float objx, float objy, float objz,
821- const float modelview[16], const float projection[16],
822- const GLint viewport[4],
823- float *winx, float *winy, float *winz)
824+project (float objx,
825+ float objy,
826+ float objz,
827+ const float modelview[16],
828+ const float projection[16],
829+ const GLint viewport[4],
830+ float *winx,
831+ float *winy,
832+ float *winz)
833 {
834 unsigned int i;
835- float in[4];
836- float out[4];
837+ float in[4];
838+ float out[4];
839
840 in[0] = objx;
841 in[1] = objy;
842@@ -870,11 +910,11 @@
843
844 /// Either points or objects should be non-0.
845 bool
846-AnimWindow::expandBBWithPoints3DTransform (CompOutput &output,
847- GLMatrix &transform,
848- const float *points,
849+AnimWindow::expandBBWithPoints3DTransform (CompOutput &output,
850+ GLMatrix &transform,
851+ const float *points,
852 GridAnim::GridModel::GridObject *objects,
853- unsigned int nPoints)
854+ unsigned int nPoints)
855 {
856 GLfloat x, y, z;
857 GLint viewport[4] =
858@@ -884,16 +924,16 @@
859 output.height ()};
860
861 const float *projection =
862- GLScreen::get (::screen)->projectionMatrix ()->getMatrix ();
863+ GLScreen::get (::screen)->projectionMatrix ()->getMatrix ();
864
865 if (points) // use points
866 {
867- for (; nPoints; nPoints--, points += 3)
868+ for (; nPoints; --nPoints, points += 3)
869 {
870 if (!project (points[0], points[1], points[2],
871- transform.getMatrix (), projection,
872- viewport,
873- &x, &y, &z))
874+ transform.getMatrix (), projection,
875+ viewport,
876+ &x, &y, &z))
877 return false;
878
879 expandBBWithPoint (x + 0.5, (::screen->height () - y) + 0.5);
880@@ -902,14 +942,19 @@
881 else // use grid model objects
882 {
883 GridAnim::GridModel::GridObject *object = objects;
884- for (; nPoints; --nPoints, ++object)
885+<<<<<<< TREE
886+ for (; nPoints; --nPoints, ++object)
887+=======
888+
889+ for (; nPoints; --nPoints, ++object)
890+>>>>>>> MERGE-SOURCE
891 {
892 if (!project (object->position ().x (),
893- object->position ().y (),
894- object->position ().z (),
895- transform.getMatrix (), projection,
896- viewport,
897- &x, &y, &z))
898+ object->position ().y (),
899+ object->position ().z (),
900+ transform.getMatrix (), projection,
901+ viewport,
902+ &x, &y, &z))
903 return false;
904
905 expandBBWithPoint (x + 0.5, (::screen->height () - y) + 0.5);
906@@ -924,7 +969,8 @@
907 CompRect outRect (savedRectsValid () ?
908 savedOutRect () :
909 mWindow->outputRect ());
910- Box windowBox = {
911+ Box windowBox =
912+ {
913 static_cast <short int> (outRect.x ()), static_cast <short int> (outRect.x () + outRect.width ()),
914 static_cast <short int> (outRect.y ()), static_cast <short int> (outRect.y () + outRect.height ())
915 };
916@@ -941,8 +987,8 @@
917
918 void
919 Animation::prepareTransform (CompOutput &output,
920- GLMatrix &resultTransform,
921- GLMatrix &transform)
922+ GLMatrix &resultTransform,
923+ GLMatrix &transform)
924 {
925 GLMatrix sTransform;
926 sTransform.toScreenSpace (&output, -DEFAULT_Z_CAMERA);
927@@ -954,9 +1000,9 @@
928 {
929 // Have a 1 pixel margin to prevent occasional 1 pixel line artifact
930 CompRegion region (priv->mBB.x1 - 1,
931- priv->mBB.y1 - 1,
932- priv->mBB.x2 - priv->mBB.x1 + 2,
933- priv->mBB.y2 - priv->mBB.y1 + 2);
934+ priv->mBB.y1 - 1,
935+ priv->mBB.x2 - priv->mBB.x1 + 2,
936+ priv->mBB.y2 - priv->mBB.y1 + 2);
937 priv->mStepRegion = region;
938 }
939
940@@ -978,7 +1024,8 @@
941 }
942
943 bool
944-AnimScreen::getMousePointerXY (short *x, short *y)
945+AnimScreen::getMousePointerXY (short *x,
946+ short *y)
947 {
948 Window w1, w2;
949 int xp, yp, xj, yj;
950@@ -998,21 +1045,21 @@
951 PrivateAnimWindow::getState ()
952 {
953 Atom actual;
954- int result, format;
955+ int format;
956 unsigned long n, left;
957 unsigned char *data;
958 unsigned int retval = WithdrawnState;
959
960- result = XGetWindowProperty (::screen->dpy (), mWindow->id (),
961- Atoms::wmState, 0L,
962- 1L, false,
963- Atoms::wmState,
964- &actual, &format, &n, &left, &data);
965+ int result = XGetWindowProperty (::screen->dpy (), mWindow->id (),
966+ Atoms::wmState, 0L,
967+ 1L, false,
968+ Atoms::wmState,
969+ &actual, &format, &n, &left, &data);
970
971 if (result == Success && data)
972 {
973 if (n)
974- memcpy (&retval, data, sizeof (int));
975+ memcpy (&retval, data, sizeof (int));
976
977 XFree ((void *)data);
978 }
979@@ -1039,6 +1086,7 @@
980 {
981 if (mExtensionPlugins.empty ())
982 initAnimationList ();
983+
984 foreach (CompOption::Value &val, opt->value ().list ())
985 val.match ().update ();
986 }
987@@ -1049,6 +1097,7 @@
988 {
989 if (mExtensionPlugins.empty ())
990 initAnimationList ();
991+
992 updateOptionSets (getCorrespondingAnimEvent (num));
993 }
994
995@@ -1058,6 +1107,7 @@
996 {
997 if (mExtensionPlugins.empty ())
998 initAnimationList ();
999+
1000 updateEventEffects (getCorrespondingAnimEvent (num), false);
1001 }
1002
1003@@ -1067,6 +1117,7 @@
1004 {
1005 if (mExtensionPlugins.empty ())
1006 initAnimationList ();
1007+
1008 updateEventEffects (getCorrespondingAnimEvent (num), true);
1009 }
1010
1011@@ -1076,22 +1127,21 @@
1012 bool clearMatchingRow)
1013 {
1014 bool shouldDamageWindow = false;
1015-
1016+
1017 notifyAnimation (false);
1018
1019- if (mCurAnimation)
1020- {
1021- if (mCurAnimation->shouldDamageWindowOnEnd ())
1022- shouldDamageWindow = true;
1023- }
1024+ if (mCurAnimation &&
1025+ mCurAnimation->shouldDamageWindowOnEnd ())
1026+ shouldDamageWindow = true;
1027+
1028 enablePainting (false);
1029
1030 if (shouldDamageWindow)
1031 mAWindow->expandBBWithWindow ();
1032
1033 if (shouldDamageWindow ||
1034- (mCurAnimation &&
1035- !mCurAnimation->stepRegionUsed () &&
1036+ (mCurAnimation &&
1037+ !mCurAnimation->stepRegionUsed () &&
1038 mAWindow->BB ()->x1 != MAXSHORT)) // BB intialized
1039 mAWindow->resetStepRegionWithBB ();
1040
1041@@ -1113,16 +1163,20 @@
1042 mCurAnimSelectionRow = -1;
1043
1044 mFinishingAnim = true;
1045+
1046 if (!destructing)
1047 {
1048 mIgnoreDamage = true;
1049+
1050 while (mUnmapCnt > 0)
1051 {
1052 mWindow->unmap ();
1053 --mUnmapCnt;
1054 }
1055+
1056 if (mUnmapCnt < 0)
1057 mUnmapCnt = 0;
1058+
1059 mIgnoreDamage = false;
1060 }
1061
1062@@ -1131,6 +1185,7 @@
1063 mWindow->destroy ();
1064 --mDestroyCnt;
1065 }
1066+
1067 mFinishingAnim = false;
1068
1069 foreach (ExtensionPluginInfo *extPlugin, mPAScreen->mExtensionPlugins)
1070@@ -1175,12 +1230,10 @@
1071 return;
1072 }
1073 else
1074- {
1075 // Animations have finished for all windows
1076 // (Keep preparePaint enabled)
1077-
1078 aScreen->enableCustomPaintList (false);
1079- }
1080+
1081 cScreen->donePaintSetEnabled (this, activating);
1082 gScreen->glPaintOutputSetEnabled (this, activating);
1083
1084@@ -1200,49 +1253,56 @@
1085 void
1086 PrivateAnimWindow::notifyAnimation (bool activation)
1087 {
1088- CompOption::Vector o (0);
1089-
1090 if (!mCurAnimation)
1091 return;
1092-
1093+
1094+ CompOption::Vector o (0);
1095+
1096 o.push_back (CompOption ("root", CompOption::TypeInt));
1097 o.push_back (CompOption ("window", CompOption::TypeInt));
1098 o.push_back (CompOption ("type", CompOption::TypeString));
1099 o.push_back (CompOption ("active", CompOption::TypeBool));
1100-
1101+
1102 o[0].value ().set ((int) ::screen->root ());
1103 o[1].value ().set ((int) mWindow->id ());
1104-
1105+
1106 switch (mCurAnimation->curWindowEvent ())
1107 {
1108 case WindowEventOpen:
1109 o[2].value ().set ("open");
1110 break;
1111+
1112 case WindowEventClose:
1113 o[2].value ().set ("close");
1114 break;
1115+
1116 case WindowEventMinimize:
1117 o[2].value ().set ("minimize");
1118 break;
1119+
1120 case WindowEventUnminimize:
1121 o[2].value ().set ("unminimize");
1122 break;
1123+
1124 case WindowEventShade:
1125 o[2].value ().set ("shade");
1126 break;
1127+
1128 case WindowEventUnshade:
1129 o[2].value ().set ("unshade");
1130 break;
1131+
1132 case WindowEventFocus:
1133 o[2].value ().set ("focus");
1134 break;
1135+
1136 case WindowEventNum:
1137 case WindowEventNone:
1138 default:
1139 o[2].value ().set ("none");
1140 break;
1141 }
1142-
1143+
1144 o[3].value ().set (activation);
1145
1146 screen->handleCompizEvent ("animation", "window_animation", o);
1147@@ -1254,6 +1314,7 @@
1148 for (int i = 0; i < WatchedScreenPluginNum; ++i)
1149 if (mPluginActive[i])
1150 return true;
1151+
1152 return false;
1153 }
1154
1155@@ -1261,6 +1322,7 @@
1156 Animation::shouldSkipFrame (int msSinceLastPaintActual)
1157 {
1158 mTimeElapsedWithinTimeStep += msSinceLastPaintActual;
1159+
1160 if (mTimeElapsedWithinTimeStep < mTimestep) // if timestep not yet completed
1161 return true;
1162
1163@@ -1304,7 +1366,7 @@
1164 extPlugin->prePreparePaintGeneral ();
1165
1166 if (mAnimInProgress)
1167- {
1168+ {
1169 int msSinceLastPaintActual;
1170 const CompWindowList &pl = pushLockedPaintList ();
1171 CompWindowList windowsFinishedAnimations;
1172@@ -1325,14 +1387,19 @@
1173 mLastRedrawTime = curTime; // Store current time for next time
1174 mLastRedrawTimeFresh = true;
1175
1176+ CompWindow *w;
1177+ AnimWindow *animWin;
1178+ PrivateAnimWindow *aw;
1179+ Animation *curAnim;
1180+
1181 /* Paint list includes destroyed windows */
1182 for (CompWindowList::const_reverse_iterator rit = pl.rbegin ();
1183 rit != pl.rend (); ++rit)
1184 {
1185- CompWindow *w = (*rit);
1186- AnimWindow *animWin = AnimWindow::get (w);
1187- PrivateAnimWindow *aw = animWin->priv;
1188- Animation *curAnim = aw->curAnimation ();
1189+ w = (*rit);
1190+ animWin = AnimWindow::get (w);
1191+ aw = animWin->priv;
1192+ curAnim = aw->curAnimation ();
1193
1194 if (curAnim)
1195 {
1196@@ -1393,6 +1460,7 @@
1197 // so reset step region here with BB.
1198 animWin->resetStepRegionWithBB ();
1199 }
1200+
1201 if (!(cScreen->damageMask () &
1202 COMPOSITE_SCREEN_DAMAGE_ALL_MASK))
1203 aw->damageThisAndLastStepRegion ();
1204@@ -1400,6 +1468,7 @@
1205 }
1206
1207 bool finished = (curAnim->remainingTime () <= 0);
1208+
1209 if (finished) // Animation is done
1210 windowsFinishedAnimations.push_back (w);
1211 }
1212@@ -1408,6 +1477,7 @@
1213 foreach (CompWindow *w, pl)
1214 {
1215 PrivateAnimWindow *aw = AnimWindow::get (w)->priv;
1216+
1217 if (aw->curAnimation ())
1218 aw->curAnimation ()->postPreparePaint ();
1219 }
1220@@ -1422,7 +1492,12 @@
1221
1222 if (mStartCountdown)
1223 {
1224- --mStartCountdown;
1225+<<<<<<< TREE
1226+ --mStartCountdown;
1227+=======
1228+ --mStartCountdown;
1229+
1230+>>>>>>> MERGE-SOURCE
1231 if (!mStartCountdown)
1232 {
1233 foreach (ExtensionPluginInfo *extPlugin, mExtensionPlugins)
1234@@ -1440,19 +1515,24 @@
1235 CompWindowList windowsFinishedAnimations;
1236
1237 bool animStillInProgress = false;
1238+ CompWindow *w;
1239+ AnimWindow *animWin;
1240+ PrivateAnimWindow *aw;
1241+ Animation *curAnim;
1242
1243 /* Paint list includes destroyed windows */
1244 for (CompWindowList::const_reverse_iterator rit = pl.rbegin ();
1245 rit != pl.rend (); ++rit)
1246 {
1247- CompWindow *w = (*rit);
1248- AnimWindow *animWin = AnimWindow::get (w);
1249- PrivateAnimWindow *aw = animWin->priv;
1250- Animation *curAnim = aw->curAnimation ();
1251+ w = (*rit);
1252+ animWin = AnimWindow::get (w);
1253+ aw = animWin->priv;
1254+ curAnim = aw->curAnimation ();
1255
1256 if (curAnim)
1257 {
1258 bool finished = (curAnim->remainingTime () <= 0);
1259+
1260 if (finished) // Animation is done
1261 windowsFinishedAnimations.push_back (w);
1262 else
1263@@ -1518,16 +1598,16 @@
1264 bool
1265 Animation::shouldDamageWindowOnStart ()
1266 {
1267- return (mCurWindowEvent == WindowEventClose ||
1268- mCurWindowEvent == WindowEventMinimize ||
1269+ return (mCurWindowEvent == WindowEventClose ||
1270+ mCurWindowEvent == WindowEventMinimize ||
1271 mCurWindowEvent == WindowEventShade);
1272 }
1273
1274 bool
1275 Animation::shouldDamageWindowOnEnd ()
1276 {
1277- return (mCurWindowEvent == WindowEventOpen ||
1278- mCurWindowEvent == WindowEventUnminimize ||
1279+ return (mCurWindowEvent == WindowEventOpen ||
1280+ mCurWindowEvent == WindowEventUnminimize ||
1281 mCurWindowEvent == WindowEventUnshade);
1282 }
1283
1284@@ -1563,15 +1643,13 @@
1285 }
1286
1287 void
1288-PrivateAnimWindow::glDrawTexture (GLTexture *texture,
1289- const GLMatrix &transform,
1290- const GLWindowPaintAttrib &attrib,
1291- unsigned int mask)
1292+PrivateAnimWindow::glDrawTexture (GLTexture *texture,
1293+ const GLMatrix &transform,
1294+ const GLWindowPaintAttrib &attrib,
1295+ unsigned int mask)
1296 {
1297 if (mCurAnimation)
1298- {
1299 mCurAnimation->setCurPaintAttrib (attrib);
1300- }
1301
1302 gWindow->glDrawTexture (texture, transform, attrib, mask);
1303 }
1304@@ -1586,16 +1664,14 @@
1305 mCurAnimation->drawGeometry ();
1306 }
1307 else
1308- {
1309 gWindow->glDrawGeometry ();
1310- }
1311 }
1312 #endif
1313
1314 void
1315-Animation::drawTexture (GLTexture *texture,
1316- const GLWindowPaintAttrib &attrib,
1317- unsigned int mask)
1318+Animation::drawTexture (GLTexture *texture,
1319+ const GLWindowPaintAttrib &attrib,
1320+ unsigned int mask)
1321 {
1322 mCurPaintAttrib = attrib;
1323 }
1324@@ -1610,8 +1686,9 @@
1325
1326 bool
1327 PrivateAnimWindow::glPaint (const GLWindowPaintAttrib &attrib,
1328- const GLMatrix &transform,
1329- const CompRegion &region, unsigned int mask)
1330+ const GLMatrix &transform,
1331+ const CompRegion &region,
1332+ unsigned int mask)
1333 {
1334 bool status;
1335
1336@@ -1694,7 +1771,7 @@
1337 {
1338 if (!mLockedPaintListCnt)
1339 {
1340- const CompWindowList &pl = cScreen->getWindowPaintList ();
1341+ const CompWindowList &pl = cScreen->getWindowPaintList ();
1342 mLockedPaintList = &pl;
1343
1344 if (!mGetWindowPaintListEnableCnt)
1345@@ -1704,7 +1781,12 @@
1346 }
1347 }
1348
1349- ++mLockedPaintListCnt;
1350+<<<<<<< TREE
1351+ ++mLockedPaintListCnt;
1352+=======
1353+ ++mLockedPaintListCnt;
1354+
1355+>>>>>>> MERGE-SOURCE
1356 return *mLockedPaintList;
1357 }
1358
1359@@ -1734,6 +1816,7 @@
1360
1361 ExtensionPluginAnimation *extPlugin =
1362 static_cast<ExtensionPluginAnimation *> (mExtensionPlugins[0]);
1363+
1364 return extPlugin->getWindowPaintList ();
1365 }
1366
1367@@ -1802,7 +1885,12 @@
1368 {
1369 ::screen->handleCompizEvent (pluginName, eventName, options);
1370
1371- for (int i = 0; i < WatchedScreenPluginNum; ++i)
1372+<<<<<<< TREE
1373+ for (int i = 0; i < WatchedScreenPluginNum; ++i)
1374+=======
1375+ for (int i = 0; i < WatchedScreenPluginNum; ++i)
1376+ {
1377+>>>>>>> MERGE-SOURCE
1378 if (strcmp (pluginName, watchedScreenPlugins[i].pluginName) == 0)
1379 {
1380 if (strcmp (eventName,
1381@@ -1813,17 +1901,22 @@
1382
1383 if (!mPluginActive[i] &&
1384 (i == WatchedPluginSwitcher ||
1385- i == WatchedPluginRing ||
1386- i == WatchedPluginShift ||
1387+ i == WatchedPluginRing ||
1388+ i == WatchedPluginShift ||
1389 i == WatchedPluginScale))
1390- {
1391 mSwitcherPostWait = 1;
1392- }
1393 }
1394+
1395 break;
1396 }
1397+ }
1398
1399- for (int i = 0; i < WatchedWindowPluginNum; ++i)
1400+<<<<<<< TREE
1401+ for (int i = 0; i < WatchedWindowPluginNum; ++i)
1402+=======
1403+ for (int i = 0; i < WatchedWindowPluginNum; ++i)
1404+ {
1405+>>>>>>> MERGE-SOURCE
1406 if (strcmp (pluginName,
1407 watchedWindowPlugins[i].pluginName) == 0)
1408 {
1409@@ -1845,14 +1938,17 @@
1410 false);
1411 }
1412 }
1413+
1414 break;
1415 }
1416+ }
1417 }
1418
1419 /// Returns true for windows that don't have a pixmap or certain properties,
1420 /// like the dimming layer of gksudo and x-session-manager.
1421 inline bool
1422-PrivateAnimScreen::shouldIgnoreWindowForAnim (CompWindow *w, bool checkPixmap)
1423+PrivateAnimScreen::shouldIgnoreWindowForAnim (CompWindow *w,
1424+ bool checkPixmap)
1425 {
1426 AnimWindow *aw = AnimWindow::get (w);
1427
1428@@ -1889,6 +1985,7 @@
1429
1430 if (shouldIgnoreWindowForAnim (w, true))
1431 return;
1432+
1433 int duration = 200;
1434 AnimEffect chosenEffect =
1435 getMatchingAnimSelection (w, AnimEventClose, &duration);
1436@@ -1921,9 +2018,7 @@
1437 }
1438 }*/
1439 else
1440- {
1441 aw->postAnimationCleanUpPrev (true, false);
1442- }
1443 }
1444
1445 if (startingNew)
1446@@ -1989,35 +2084,35 @@
1447
1448 // Make sure non-animated closing windows get a damage.
1449 if (!aw->curAnimation ())
1450- {
1451 aw->mAWindow->expandBBWithWindow ();
1452- }
1453 }
1454
1455 CompRect
1456-PrivateAnimScreen::getIcon (CompWindow *w, bool alwaysUseMouse)
1457+PrivateAnimScreen::getIcon (CompWindow *w,
1458+ bool alwaysUseMouse)
1459 {
1460 CompRect icon;
1461
1462 if (!alwaysUseMouse)
1463- {
1464 icon = w->iconGeometry ();
1465- }
1466+
1467 if (alwaysUseMouse ||
1468- (icon.x () == 0 &&
1469- icon.y () == 0 &&
1470+ (icon.x () == 0 &&
1471+ icon.y () == 0 &&
1472 icon.width () == 0 &&
1473 icon.height () == 0)) // that is, couldn't get icon from window
1474 {
1475 // Minimize to mouse pointer if there is no
1476 // window list or if the window skips taskbar
1477 short x, y;
1478+
1479 if (!aScreen->getMousePointerXY (&x, &y))
1480 {
1481 // Use screen center if can't get mouse coords
1482 x = ::screen->width () / 2;
1483 y = ::screen->height () / 2;
1484 }
1485+
1486 icon.setX (x);
1487 icon.setY (y);
1488 icon.setWidth (FAKE_ICON_SIZE);
1489@@ -2053,7 +2148,7 @@
1490
1491 if (chosenEffect != AnimEffectNone)
1492 {
1493- bool startingNew = true;
1494+ bool startingNew = true;
1495 WindowEvent curWindowEvent = WindowEventNone;
1496
1497 if (aw->curAnimation ())
1498@@ -2062,9 +2157,7 @@
1499 if (curWindowEvent != WindowEventNone)
1500 {
1501 if (curWindowEvent != WindowEventUnminimize)
1502- {
1503 aw->postAnimationCleanUpPrev (false, false);
1504- }
1505 else
1506 {
1507 startingNew = false;
1508@@ -2112,17 +2205,16 @@
1509
1510 if (chosenEffect != AnimEffectNone)
1511 {
1512- bool startingNew = true;
1513+ bool startingNew = true;
1514 WindowEvent curWindowEvent = WindowEventNone;
1515+
1516 if (aw->curAnimation ())
1517 curWindowEvent = aw->curAnimation ()->curWindowEvent ();
1518
1519 if (curWindowEvent != WindowEventNone)
1520 {
1521 if (curWindowEvent != WindowEventUnshade)
1522- {
1523 aw->postAnimationCleanUpPrev (false, false);
1524- }
1525 else
1526 {
1527 startingNew = false;
1528@@ -2169,6 +2261,7 @@
1529 extPlugin->preInitiateOpenAnim (aw->mAWindow);
1530
1531 WindowEvent curWindowEvent = WindowEventNone;
1532+
1533 if (aw->curAnimation ())
1534 curWindowEvent = aw->curAnimation ()->curWindowEvent ();
1535
1536@@ -2185,9 +2278,7 @@
1537 if (curWindowEvent != WindowEventNone)
1538 {
1539 if (curWindowEvent != WindowEventClose)
1540- {
1541 aw->postAnimationCleanUpPrev (false, false);
1542- }
1543 else
1544 {
1545 startingNew = false;
1546@@ -2251,15 +2342,14 @@
1547
1548 // TODO Refactor the rest? (almost the same in other initiateX methods)
1549 WindowEvent curWindowEvent = WindowEventNone;
1550+
1551 if (aw->curAnimation ())
1552 curWindowEvent = aw->curAnimation ()->curWindowEvent ();
1553
1554 if (curWindowEvent != WindowEventNone)
1555 {
1556 if (curWindowEvent != WindowEventMinimize)
1557- {
1558 aw->postAnimationCleanUpPrev (false, false);
1559- }
1560 else
1561 {
1562 startingNew = false;
1563@@ -2316,15 +2406,14 @@
1564 bool playEffect = true;
1565
1566 WindowEvent curWindowEvent = WindowEventNone;
1567+
1568 if (aw->curAnimation ())
1569 curWindowEvent = aw->curAnimation ()->curWindowEvent ();
1570
1571 if (curWindowEvent != WindowEventNone)
1572 {
1573 if (curWindowEvent != WindowEventShade)
1574- {
1575 aw->postAnimationCleanUpPrev (false, false);
1576- }
1577 else
1578 {
1579 startingNew = false;
1580@@ -2363,8 +2452,8 @@
1581 bool
1582 PrivateAnimScreen::initiateFocusAnim (PrivateAnimWindow *aw)
1583 {
1584- CompWindow *w = aw->mWindow;
1585- int duration = 200;
1586+ CompWindow *w = aw->mWindow;
1587+ int duration = 200;
1588
1589 if (aw->curAnimation () || otherPluginsActive () ||
1590 // Check the "switcher post-wait" counter that effectively prevents
1591@@ -2407,19 +2496,19 @@
1592 mUnshadePending = false;
1593 mPAScreen->initiateUnshadeAnim (this);
1594 }
1595- else if (mCurAnimation && mCurAnimation->inProgress () &&
1596+ else if (mCurAnimation && mCurAnimation->inProgress () &&
1597 // Don't let transient window open anim be interrupted with a resize notify
1598- !(mCurAnimation->curWindowEvent () == WindowEventOpen &&
1599+ !(mCurAnimation->curWindowEvent () == WindowEventOpen &&
1600 (mWindow->wmType () &
1601- (CompWindowTypeDropdownMenuMask |
1602- CompWindowTypePopupMenuMask |
1603- CompWindowTypeMenuMask |
1604- CompWindowTypeTooltipMask |
1605- CompWindowTypeNotificationMask |
1606- CompWindowTypeComboMask |
1607- CompWindowTypeDndMask))) &&
1608+ (CompWindowTypeDropdownMenuMask |
1609+ CompWindowTypePopupMenuMask |
1610+ CompWindowTypeMenuMask |
1611+ CompWindowTypeTooltipMask |
1612+ CompWindowTypeNotificationMask |
1613+ CompWindowTypeComboMask |
1614+ CompWindowTypeDndMask))) &&
1615 // Ignore resize with dx=0, dy=0, dwidth=0, dheight=0
1616- !(dx == 0 && dy == 0 && dwidth == 0 && dheight == 0) &&
1617+ !(dx == 0 && dy == 0 && dwidth == 0 && dheight == 0) &&
1618 !mCurAnimation->resizeUpdate (dx, dy, dwidth, dheight))
1619 {
1620 postAnimationCleanUp ();
1621@@ -2445,9 +2534,7 @@
1622 break;
1623 }
1624 else
1625- {
1626 aw->notifyAnimation (false);
1627- }
1628 }
1629
1630 popLockedPaintList ();
1631@@ -2462,11 +2549,11 @@
1632 bool immediate)
1633 {
1634 if (mCurAnimation && mCurAnimation->inProgress () &&
1635- (mGrabbed || !mCurAnimation->moveUpdate (dx, dy)))
1636+ (mGrabbed || !mCurAnimation->moveUpdate (dx, dy)))
1637 {
1638 // Stop the animation
1639- postAnimationCleanUp ();
1640- mPAScreen->updateAnimStillInProgress ();
1641+ postAnimationCleanUp ();
1642+ mPAScreen->updateAnimStillInProgress ();
1643 }
1644
1645 mWindow->moveNotify (dx, dy, immediate);
1646@@ -2496,7 +2583,7 @@
1647 const GLMatrix &matrix,
1648 const CompRegion &region,
1649 CompOutput *output,
1650- unsigned int mask)
1651+ unsigned int mask)
1652 {
1653 assert (mAnimInProgress);
1654
1655@@ -2530,46 +2617,88 @@
1656
1657 AnimEffectUsedFor& AnimEffectUsedFor::exclude (AnimEvent event)
1658 {
1659- switch (event) {
1660- case AnimEventOpen: open = false; break;
1661- case AnimEventClose: close = false; break;
1662- case AnimEventMinimize: minimize = false; break;
1663- case AnimEventUnminimize: unminimize = false; break;
1664- case AnimEventShade: shade = false; break;
1665- case AnimEventFocus: focus = false; break;
1666- default: break;
1667- }
1668- return *this;
1669+ switch (event)
1670+ {
1671+ case AnimEventOpen:
1672+ open = false;
1673+ break;
1674+
1675+ case AnimEventClose:
1676+ close = false;
1677+ break;
1678+
1679+ case AnimEventMinimize:
1680+ minimize = false;
1681+ break;
1682+
1683+ case AnimEventUnminimize:
1684+ unminimize = false;
1685+ break;
1686+
1687+ case AnimEventShade:
1688+ shade = false;
1689+ break;
1690+
1691+ case AnimEventFocus:
1692+ focus = false;
1693+ break;
1694+
1695+ default:
1696+ break;
1697+ }
1698+
1699+ return *this;
1700 }
1701
1702 AnimEffectUsedFor& AnimEffectUsedFor::include (AnimEvent event)
1703 {
1704- switch (event) {
1705- case AnimEventOpen: open = true; break;
1706- case AnimEventClose: close = true; break;
1707- case AnimEventMinimize: minimize = true; break;
1708- case AnimEventUnminimize: unminimize = true; break;
1709- case AnimEventShade: shade = true; break;
1710- case AnimEventFocus: focus = true; break;
1711- default: break;
1712- }
1713+ switch (event)
1714+ {
1715+ case AnimEventOpen:
1716+ open = true;
1717+ break;
1718+
1719+ case AnimEventClose:
1720+ close = true;
1721+ break;
1722+
1723+ case AnimEventMinimize:
1724+ minimize = true;
1725+ break;
1726+
1727+ case AnimEventUnminimize:
1728+ unminimize = true;
1729+ break;
1730+
1731+ case AnimEventShade:
1732+ shade = true;
1733+ break;
1734+
1735+ case AnimEventFocus:
1736+ focus = true;
1737+ break;
1738+
1739+ default:
1740+ break;
1741+ }
1742+
1743 return *this;
1744 }
1745
1746-AnimEffectInfo::AnimEffectInfo (const char *name,
1747- AnimEffectUsedFor usedFor,
1748- CreateAnimFunc create,
1749- bool isRestackAnim) :
1750+AnimEffectInfo::AnimEffectInfo (const char *name,
1751+ AnimEffectUsedFor usedFor,
1752+ CreateAnimFunc create,
1753+ bool isRestackAnim) :
1754 name (name),
1755 create (create),
1756 isRestackAnim (isRestackAnim)
1757 {
1758- usedForEvents[AnimEventOpen] = usedFor.open;
1759- usedForEvents[AnimEventClose] = usedFor.close;
1760- usedForEvents[AnimEventMinimize] = usedFor.minimize;
1761+ usedForEvents[AnimEventOpen] = usedFor.open;
1762+ usedForEvents[AnimEventClose] = usedFor.close;
1763+ usedForEvents[AnimEventMinimize] = usedFor.minimize;
1764 usedForEvents[AnimEventUnminimize] = usedFor.unminimize;
1765- usedForEvents[AnimEventShade] = usedFor.shade;
1766- usedForEvents[AnimEventFocus] = usedFor.focus;
1767+ usedForEvents[AnimEventShade] = usedFor.shade;
1768+ usedForEvents[AnimEventFocus] = usedFor.focus;
1769 }
1770
1771 bool
1772@@ -2587,7 +2716,7 @@
1773 AnimEffect animEffects[NUM_EFFECTS];
1774
1775 ExtensionPluginAnimation animExtensionPluginInfo (CompString ("animation"),
1776- NUM_EFFECTS, animEffects, 0,
1777+ NUM_EFFECTS, animEffects, 0,
1778 NUM_NONEFFECT_OPTIONS);
1779 ExtensionPluginInfo *
1780 Animation::getExtensionPluginInfo ()
1781@@ -2695,86 +2824,86 @@
1782 int i = 0;
1783
1784 animEffects[i++] = AnimEffectNone =
1785- new AnimEffectInfo ("animation:None",
1786- AnimEffectUsedFor::all(),
1787- 0);
1788+ new AnimEffectInfo ("animation:None",
1789+ AnimEffectUsedFor::all(),
1790+ 0);
1791
1792 animEffects[i++] = AnimEffectRandom =
1793- new AnimEffectInfo ("animation:Random",
1794- AnimEffectUsedFor::all().exclude(AnimEventFocus),
1795- 0);
1796+ new AnimEffectInfo ("animation:Random",
1797+ AnimEffectUsedFor::all().exclude(AnimEventFocus),
1798+ 0);
1799
1800 animEffects[i++] = AnimEffectCurvedFold =
1801- new AnimEffectInfo ("animation:Curved Fold",
1802- AnimEffectUsedFor::all().exclude(AnimEventFocus),
1803- &createAnimation<CurvedFoldAnim>);
1804-
1805+ new AnimEffectInfo ("animation:Curved Fold",
1806+ AnimEffectUsedFor::all().exclude(AnimEventFocus),
1807+ &createAnimation<CurvedFoldAnim>);
1808+
1809 animEffects[i++] = AnimEffectDodge =
1810- new AnimEffectInfo ("animation:Dodge",
1811- AnimEffectUsedFor::none().include(AnimEventFocus),
1812- &createAnimation<DodgeAnim>,
1813- true);
1814-
1815+ new AnimEffectInfo ("animation:Dodge",
1816+ AnimEffectUsedFor::none().include(AnimEventFocus),
1817+ &createAnimation<DodgeAnim>,
1818+ true);
1819+
1820 animEffects[i++] = AnimEffectDream =
1821- new AnimEffectInfo ("animation:Dream",
1822- AnimEffectUsedFor::all().exclude(AnimEventFocus).exclude(AnimEventShade),
1823- &createAnimation<DreamAnim>);
1824+ new AnimEffectInfo ("animation:Dream",
1825+ AnimEffectUsedFor::all().exclude(AnimEventFocus).exclude(AnimEventShade),
1826+ &createAnimation<DreamAnim>);
1827
1828 animEffects[i++] = AnimEffectFade =
1829- new AnimEffectInfo ("animation:Fade",
1830- AnimEffectUsedFor::all().exclude(AnimEventFocus).exclude(AnimEventShade),
1831- &createAnimation<FadeAnim>);
1832-
1833+ new AnimEffectInfo ("animation:Fade",
1834+ AnimEffectUsedFor::all().exclude(AnimEventFocus).exclude(AnimEventShade),
1835+ &createAnimation<FadeAnim>);
1836+
1837 animEffects[i++] = AnimEffectFocusFade =
1838- new AnimEffectInfo ("animation:Focus Fade",
1839- AnimEffectUsedFor::none().include(AnimEventFocus),
1840- &createAnimation<FocusFadeAnim>,
1841- true);
1842-
1843+ new AnimEffectInfo ("animation:Focus Fade",
1844+ AnimEffectUsedFor::none().include(AnimEventFocus),
1845+ &createAnimation<FocusFadeAnim>,
1846+ true);
1847+
1848 animEffects[i++] = AnimEffectGlide1 =
1849- new AnimEffectInfo ("animation:Glide 1",
1850- AnimEffectUsedFor::all().exclude(AnimEventFocus).exclude(AnimEventShade),
1851- &createAnimation<GlideAnim>);
1852-
1853+ new AnimEffectInfo ("animation:Glide 1",
1854+ AnimEffectUsedFor::all().exclude(AnimEventFocus).exclude(AnimEventShade),
1855+ &createAnimation<GlideAnim>);
1856+
1857 animEffects[i++] = AnimEffectGlide2 =
1858- new AnimEffectInfo ("animation:Glide 2",
1859- AnimEffectUsedFor::all().exclude(AnimEventFocus).exclude(AnimEventShade),
1860- &createAnimation<Glide2Anim>);
1861-
1862+ new AnimEffectInfo ("animation:Glide 2",
1863+ AnimEffectUsedFor::all().exclude(AnimEventFocus).exclude(AnimEventShade),
1864+ &createAnimation<Glide2Anim>);
1865+
1866 animEffects[i++] = AnimEffectHorizontalFolds =
1867- new AnimEffectInfo ("animation:Horizontal Folds",
1868- AnimEffectUsedFor::all().exclude(AnimEventFocus),
1869- &createAnimation<HorizontalFoldsAnim>);
1870-
1871+ new AnimEffectInfo ("animation:Horizontal Folds",
1872+ AnimEffectUsedFor::all().exclude(AnimEventFocus),
1873+ &createAnimation<HorizontalFoldsAnim>);
1874+
1875 animEffects[i++] = AnimEffectMagicLamp =
1876- new AnimEffectInfo ("animation:Magic Lamp",
1877- AnimEffectUsedFor::all().exclude(AnimEventFocus).exclude(AnimEventShade),
1878- &createAnimation<MagicLampAnim>);
1879-
1880+ new AnimEffectInfo ("animation:Magic Lamp",
1881+ AnimEffectUsedFor::all().exclude(AnimEventFocus).exclude(AnimEventShade),
1882+ &createAnimation<MagicLampAnim>);
1883+
1884 animEffects[i++] = AnimEffectMagicLampWavy =
1885- new AnimEffectInfo ("animation:Magic Lamp Wavy",
1886- AnimEffectUsedFor::all().exclude(AnimEventFocus).exclude(AnimEventShade),
1887- &createAnimation<MagicLampWavyAnim>);
1888-
1889+ new AnimEffectInfo ("animation:Magic Lamp Wavy",
1890+ AnimEffectUsedFor::all().exclude(AnimEventFocus).exclude(AnimEventShade),
1891+ &createAnimation<MagicLampWavyAnim>);
1892+
1893 animEffects[i++] = AnimEffectRollUp =
1894- new AnimEffectInfo ("animation:Roll Up",
1895- AnimEffectUsedFor::none().include(AnimEventShade),
1896- &createAnimation<RollUpAnim>);
1897-
1898+ new AnimEffectInfo ("animation:Roll Up",
1899+ AnimEffectUsedFor::none().include(AnimEventShade),
1900+ &createAnimation<RollUpAnim>);
1901+
1902 animEffects[i++] = AnimEffectSidekick =
1903- new AnimEffectInfo ("animation:Sidekick",
1904- AnimEffectUsedFor::all().exclude(AnimEventFocus).exclude(AnimEventShade),
1905- &createAnimation<SidekickAnim>);
1906-
1907+ new AnimEffectInfo ("animation:Sidekick",
1908+ AnimEffectUsedFor::all().exclude(AnimEventFocus).exclude(AnimEventShade),
1909+ &createAnimation<SidekickAnim>);
1910+
1911 animEffects[i++] = AnimEffectWave =
1912- new AnimEffectInfo ("animation:Wave",
1913- AnimEffectUsedFor::all().exclude(AnimEventShade),
1914- &createAnimation<WaveAnim>);
1915-
1916+ new AnimEffectInfo ("animation:Wave",
1917+ AnimEffectUsedFor::all().exclude(AnimEventShade),
1918+ &createAnimation<WaveAnim>);
1919+
1920 animEffects[i++] = AnimEffectZoom =
1921- new AnimEffectInfo ("animation:Zoom",
1922- AnimEffectUsedFor::all().exclude(AnimEventFocus).exclude(AnimEventShade),
1923- &createAnimation<ZoomAnim>);
1924+ new AnimEffectInfo ("animation:Zoom",
1925+ AnimEffectUsedFor::all().exclude(AnimEventFocus).exclude(AnimEventShade),
1926+ &createAnimation<ZoomAnim>);
1927
1928 animExtensionPluginInfo.effectOptions = &getOptions ();
1929
1930@@ -2813,18 +2942,14 @@
1931 mPluginActive[i] = false;
1932
1933 if (w->minimized ())
1934- {
1935 mState = mNewState = IconicState;
1936- }
1937 else if (w->shaded ())
1938 {
1939 mState = mNewState = NormalState;
1940 mNowShaded = true;
1941 }
1942 else
1943- {
1944 mState = mNewState = getState ();
1945- }
1946
1947 WindowInterface::setHandler (mWindow, true);
1948 GLWindowInterface::setHandler (gWindow, false);
1949@@ -2846,27 +2971,34 @@
1950 mPAScreen->initiateMinimizeAnim (this);
1951 mEventNotOpenClose = true;
1952 break;
1953+
1954 case CompWindowNotifyLeaveShowDesktopMode:
1955 case CompWindowNotifyUnminimize:
1956 mPAScreen->initiateUnminimizeAnim (this);
1957 mEventNotOpenClose = true;
1958 break;
1959+
1960 case CompWindowNotifyShade:
1961 mPAScreen->initiateShadeAnim (this);
1962 mEventNotOpenClose = true;
1963 break;
1964+
1965 case CompWindowNotifyUnshade:
1966 if (mNowShaded &&
1967 mCurAnimation &&
1968 mCurAnimation->curWindowEvent () == WindowEventShade)
1969 mPAScreen->initiateUnshadeAnim (this); // reverse the shade anim
1970+
1971 break;
1972+
1973 case CompWindowNotifyClose:
1974 if (!(mCurAnimation &&
1975 (mCurAnimation->curWindowEvent () == WindowEventClose ||
1976 mCurAnimation->curWindowEvent () == WindowEventUnminimize)))
1977 mPAScreen->initiateCloseAnim (this);
1978+
1979 break;
1980+
1981 case CompWindowNotifyShow:
1982 case CompWindowNotifyBeforeMap:
1983 // Prevent dialog disappearing when a dialog is reopened during
1984@@ -2877,7 +3009,9 @@
1985 mPAScreen->initiateOpenAnim (this);
1986 mEventNotOpenClose = false;
1987 }
1988+
1989 break;
1990+
1991 case CompWindowNotifyMap:
1992 if (mNowShaded)
1993 mUnshadePending = true;
1994@@ -2890,7 +3024,9 @@
1995 mCurAnimation->curWindowEvent () == WindowEventOpen)))
1996 mPAScreen->initiateOpenAnim (this);
1997 mEventNotOpenClose = false;
1998+
1999 break;
2000+
2001 case CompWindowNotifyBeforeUnmap:
2002 if (mCurAnimation && mCurAnimation->curWindowEvent () == WindowEventMinimize)
2003 {
2004@@ -2898,9 +3034,11 @@
2005 mWindow->incrementUnmapReference ();
2006 }
2007 break;
2008+
2009 case CompWindowNotifyBeforeDestroy:
2010 if (!mFinishingAnim)
2011 {
2012+<<<<<<< TREE
2013 if (mPAScreen->shouldIgnoreWindowForAnim (mWindow, true))
2014 break;
2015
2016@@ -2910,16 +3048,27 @@
2017 break;
2018
2019 ++mDestroyCnt;
2020+=======
2021+ if (mPAScreen->shouldIgnoreWindowForAnim (mWindow, true) ||
2022+ /* Don't increment the destroy reference count unless
2023+ * the window is already animated */
2024+ !mCurAnimation)
2025+ break;
2026+
2027+ ++mDestroyCnt;
2028+>>>>>>> MERGE-SOURCE
2029 mWindow->incrementDestroyReference ();
2030 }
2031+
2032 break;
2033+
2034 case CompWindowNotifyUnreparent:
2035- if (!mFinishingAnim)
2036- {
2037- if (mPAScreen->shouldIgnoreWindowForAnim (mWindow, false))
2038- break;
2039- }
2040+ if (!mFinishingAnim &&
2041+ mPAScreen->shouldIgnoreWindowForAnim (mWindow, false))
2042+ break;
2043+
2044 break;
2045+
2046 case CompWindowNotifyFocusChange:
2047 if (!mPAScreen->mLastActiveWindow ||
2048 mPAScreen->mLastActiveWindow != mWindow->id ())
2049@@ -2942,6 +3091,7 @@
2050 }
2051
2052 break;
2053+
2054 case CompWindowNotifyRestack:
2055 {
2056 // Prevent menu disappearing when a menu is reopened during
2057@@ -2956,18 +3106,17 @@
2058 }
2059
2060 // Handle CompWindowNotifyRestack only when necessary.
2061- if (!mPAScreen->isRestackAnimPossible ())
2062- break;
2063-
2064- if (mPAScreen->mStartCountdown) // Don't animate at startup
2065+ if (!mPAScreen->isRestackAnimPossible () ||
2066+ mPAScreen->mStartCountdown) // Don't animate at startup
2067 break;
2068
2069 foreach (ExtensionPluginInfo *extPlugin,
2070- mPAScreen->mExtensionPlugins)
2071+ mPAScreen->mExtensionPlugins)
2072 extPlugin->handleRestackNotify (mAWindow);
2073
2074 break;
2075 }
2076+
2077 default:
2078 break;
2079 }
2080@@ -2983,8 +3132,8 @@
2081
2082 AnimEffect
2083 AnimScreen::getMatchingAnimSelection (CompWindow *w,
2084- AnimEvent e,
2085- int *duration)
2086+ AnimEvent e,
2087+ int *duration)
2088 {
2089 return priv->getMatchingAnimSelection (w, e, duration);
2090 }
2091@@ -3009,7 +3158,8 @@
2092
2093 /// If duration is 0, it should be set to a positive value later.
2094 void
2095-AnimWindow::createFocusAnimation (AnimEffect effect, int duration)
2096+AnimWindow::createFocusAnimation (AnimEffect effect,
2097+ int duration)
2098 {
2099 priv->createFocusAnimation (effect, duration);
2100 }
2101@@ -3017,8 +3167,8 @@
2102 void
2103 AnimWindow::deletePersistentData (const char *name)
2104 {
2105- PersistentDataMap::iterator itData =
2106- persistentData.find (name);
2107+ PersistentDataMap::iterator itData = persistentData.find (name);
2108+
2109 if (itData != persistentData.end ()) // if found
2110 {
2111 delete itData->second;
2112@@ -3027,13 +3177,13 @@
2113 }
2114
2115 void
2116-PrivateAnimWindow::createFocusAnimation (AnimEffect effect, int duration)
2117+PrivateAnimWindow::createFocusAnimation (AnimEffect effect,
2118+ int duration)
2119 {
2120- mCurAnimation =
2121- effect->create (mWindow, WindowEventFocus,
2122- duration,
2123- effect,
2124- CompRect ());
2125+ mCurAnimation = effect->create (mWindow, WindowEventFocus,
2126+ duration,
2127+ effect,
2128+ CompRect ());
2129 enablePainting (true);
2130 }
2131
2132@@ -3069,6 +3219,7 @@
2133
2134 // Destroy each persistent data object
2135 PersistentDataMap::iterator itData = persistentData.begin ();
2136+
2137 for (; itData != persistentData.end (); ++itData)
2138 delete itData->second;
2139
2140
2141=== modified file 'plugins/animation/src/curvedfold.cpp'
2142--- plugins/animation/src/curvedfold.cpp 2013-04-25 11:07:54 +0000
2143+++ plugins/animation/src/curvedfold.cpp 2013-07-21 23:03:28 +0000
2144@@ -63,11 +63,11 @@
2145 return progressLinear ();
2146 }
2147
2148-CurvedFoldAnim::CurvedFoldAnim (CompWindow *w,
2149- WindowEvent curWindowEvent,
2150- float duration,
2151+CurvedFoldAnim::CurvedFoldAnim (CompWindow *w,
2152+ WindowEvent curWindowEvent,
2153+ float duration,
2154 const AnimEffect info,
2155- const CompRect &icon) :
2156+ const CompRect &icon) :
2157 Animation::Animation (w, curWindowEvent, duration, info, icon),
2158 TransformAnim::TransformAnim (w, curWindowEvent, duration, info, icon),
2159 FoldAnim::FoldAnim (w, curWindowEvent, duration, info, icon)
2160@@ -83,10 +83,10 @@
2161
2162 float
2163 CurvedFoldAnim::getObjectZ (GridAnim::GridModel *mModel,
2164- float forwardProgress,
2165- float sinForProg,
2166- float relDistToCenter,
2167- float curveMaxAmp)
2168+ float forwardProgress,
2169+ float sinForProg,
2170+ float relDistToCenter,
2171+ float curveMaxAmp)
2172 {
2173 return -(sinForProg *
2174 (1 - pow (pow (2 * relDistToCenter, 1.3), 2)) *
2175@@ -102,24 +102,20 @@
2176 float forwardProgress = getActualProgress ();
2177
2178 CompRect winRect (mAWindow->savedRectsValid () ?
2179- mAWindow->saveWinRect () :
2180- mWindow->geometry ());
2181+ mAWindow->saveWinRect () : mWindow->geometry ());
2182 CompRect inRect (mAWindow->savedRectsValid () ?
2183- mAWindow->savedInRect () :
2184- mWindow->borderRect ());
2185+ mAWindow->savedInRect () : mWindow->borderRect ());
2186 CompRect outRect (mAWindow->savedRectsValid () ?
2187- mAWindow->savedOutRect () :
2188- mWindow->outputRect ());
2189+ mAWindow->savedOutRect () : mWindow->outputRect ());
2190 CompWindowExtents outExtents (mAWindow->savedRectsValid () ?
2191- mAWindow->savedOutExtents () :
2192- mWindow->output ());
2193+ mAWindow->savedOutExtents () : mWindow->output ());
2194
2195- int wx = winRect.x ();
2196- int wy = winRect.y ();
2197+ int wx = winRect.x ();
2198+ int wy = winRect.y ();
2199 int wheight = winRect.height ();
2200
2201- int oy = outRect.y ();
2202- int owidth = outRect.width ();
2203+ int oy = outRect.y ();
2204+ int owidth = outRect.width ();
2205 int oheight = outRect.height ();
2206
2207 float curveMaxAmp = (0.4 * pow ((float)oheight /
2208@@ -130,7 +126,12 @@
2209
2210 GridModel::GridObject *object = mModel->objects ();
2211 unsigned int n = mModel->numObjects ();
2212- for (unsigned int i = 0; i < n; ++i, ++object)
2213+<<<<<<< TREE
2214+ for (unsigned int i = 0; i < n; ++i, ++object)
2215+=======
2216+
2217+ for (unsigned int i = 0; i < n; ++i, ++object)
2218+>>>>>>> MERGE-SOURCE
2219 {
2220 Point3d &objPos = object->position ();
2221
2222@@ -229,7 +230,12 @@
2223
2224 GridModel::GridObject *objects = mModel->objects ();
2225 unsigned int n = mModel->numObjects ();
2226- for (unsigned int i = 0; i < n; ++i)
2227+<<<<<<< TREE
2228+ for (unsigned int i = 0; i < n; ++i)
2229+=======
2230+
2231+ for (unsigned int i = 0; i < n; ++i)
2232+>>>>>>> MERGE-SOURCE
2233 {
2234 Point3d &pos = objects[i].position ();
2235 GLVector coords (pos.x (), pos.y (), 0, 1);
2236
2237=== modified file 'plugins/animation/src/dodge.cpp'
2238--- plugins/animation/src/dodge.cpp 2013-04-25 11:07:54 +0000
2239+++ plugins/animation/src/dodge.cpp 2013-07-21 23:03:28 +0000
2240@@ -57,7 +57,8 @@
2241 }
2242
2243 bool
2244-DodgeAnim::moveUpdate (int dx, int dy)
2245+DodgeAnim::moveUpdate (int dx,
2246+ int dy)
2247 {
2248 if (mDodgeData->isDodgeSubject &&
2249 mDodgeDirection == DodgeDirectionXY)
2250@@ -73,16 +74,19 @@
2251 // Update dodge amount for the dodgers of all subjects
2252 // in the restack chain
2253 RestackPersistentData *dataCur;
2254+
2255 for (CompWindow *wCur = wBottommost; wCur;
2256 wCur = dataCur->mMoreToBePaintedNext)
2257 {
2258 AnimWindow *awCur = AnimWindow::get (wCur);
2259 dataCur = static_cast<RestackPersistentData *>
2260 (awCur->persistentData["restack"]);
2261+
2262 if (!dataCur)
2263 break;
2264
2265 Animation *curAnim = awCur->curAnimation ();
2266+
2267 if (!curAnim || curAnim->info () != AnimEffectDodge)
2268 continue;
2269
2270@@ -99,14 +103,13 @@
2271
2272 DodgeAnim *animDodger =
2273 dynamic_cast<DodgeAnim *> (adw->curAnimation ());
2274+
2275 if (!animDodger)
2276 continue;
2277
2278 if (animDodger->mDodgeSubjectWin &&
2279 animDodger->mTransformProgress <= 0.5f)
2280- {
2281 animDodger->updateDodgerDodgeAmount ();
2282- }
2283 }
2284 }
2285
2286@@ -132,15 +135,11 @@
2287 if (((mDodgeDirection == DodgeDirectionDown && newDodgeAmount > 0) ||
2288 (mDodgeDirection == DodgeDirectionUp && newDodgeAmount < 0)) &&
2289 abs (newDodgeAmount) > abs (mDodgeMaxAmountY))
2290- {
2291 mDodgeMaxAmountY = newDodgeAmount;
2292- }
2293 else if (((mDodgeDirection == DodgeDirectionRight && newDodgeAmount > 0) ||
2294 (mDodgeDirection == DodgeDirectionLeft && newDodgeAmount < 0)) &&
2295 abs (newDodgeAmount) > abs (mDodgeMaxAmountX))
2296- {
2297 mDodgeMaxAmountX = newDodgeAmount;
2298- }
2299 }
2300
2301 float
2302@@ -160,9 +159,10 @@
2303 mTransformProgress = 0;
2304
2305 float forwardProgress = dodgeProgress ();
2306+
2307 if (forwardProgress > mTransformStartProgress)
2308 {
2309- // Compute transform progress and normalize
2310+ // Compute transform progress and normalize
2311 mTransformProgress =
2312 (forwardProgress - mTransformStartProgress) /
2313 (1 - mTransformStartProgress);
2314@@ -182,31 +182,32 @@
2315 DodgeAnim::postPreparePaint ()
2316 {
2317 // Only dodge subjects (with dodger chains) should be processed here
2318- if (!mDodgeData || !mDodgeData->isDodgeSubject ||
2319- !mDodgeData->dodgeChainStart)
2320- return;
2321-
2322- if (!mRestackData || !mRestackData->restackInfo ())
2323- return;
2324-
2325- if (mDodgeData->skipPostPrepareScreen)
2326+ if (!mDodgeData ||
2327+ !mDodgeData->isDodgeSubject ||
2328+ !mDodgeData->dodgeChainStart ||
2329+ !mRestackData ||
2330+ !mRestackData->restackInfo () ||
2331+ mDodgeData->skipPostPrepareScreen)
2332 return;
2333
2334 // Find the bottommost subject in restack chain
2335 CompWindow *wBottommost = mWindow;
2336 RestackPersistentData *dataCur;
2337+
2338 for (CompWindow *wCur = mRestackData->mMoreToBePaintedPrev; wCur;
2339- wCur = dataCur->mMoreToBePaintedPrev)
2340+ wCur = dataCur->mMoreToBePaintedPrev)
2341 {
2342- wBottommost = wCur;
2343- dataCur = static_cast<RestackPersistentData *>
2344- (AnimWindow::get (wCur)->persistentData["restack"]);
2345- if (!dataCur)
2346- break;
2347+ wBottommost = wCur;
2348+ dataCur = static_cast<RestackPersistentData *>
2349+ (AnimWindow::get (wCur)->persistentData["restack"]);
2350+
2351+ if (!dataCur)
2352+ break;
2353 }
2354+
2355 AnimWindow *awBottommost = AnimWindow::get (wBottommost);
2356 RestackPersistentData *restackDataBottommost =
2357- static_cast<RestackPersistentData *>
2358+ static_cast<RestackPersistentData *>
2359 (awBottommost->persistentData["restack"]);
2360
2361 // Find the first dodging window that hasn't yet
2362@@ -215,11 +216,14 @@
2363 // if subject is being lowered).
2364 RestackPersistentData *restackDataDodger = NULL;
2365 DodgePersistentData *dodgeDataDodger = NULL;
2366+
2367 CompWindow *dw;
2368+
2369 for (dw = mDodgeData->dodgeChainStart; dw;
2370 dw = dodgeDataDodger->dodgeChainNext)
2371 {
2372 AnimWindow *adw = AnimWindow::get (dw);
2373+
2374 restackDataDodger = static_cast<RestackPersistentData *>
2375 (adw->persistentData["restack"]);
2376 dodgeDataDodger = static_cast<DodgePersistentData *>
2377@@ -233,12 +237,13 @@
2378 }
2379
2380 RestackInfo *bottommostRestackInfo = restackDataBottommost->restackInfo ();
2381+
2382 if (!bottommostRestackInfo)
2383 return;
2384
2385 if (bottommostRestackInfo->raised &&
2386 // if mWindow's host should change
2387- dw != restackDataBottommost->mWinThisIsPaintedBefore)
2388+ dw != restackDataBottommost->mWinThisIsPaintedBefore)
2389 {
2390 if (restackDataBottommost->mWinThisIsPaintedBefore)
2391 {
2392@@ -252,13 +257,12 @@
2393 }
2394 // if a dodger win. is still at <0.5 progress
2395 if (dw && restackDataDodger)
2396- {
2397 // Put subject right behind new host
2398 restackDataDodger->mWinToBePaintedBeforeThis = wBottommost;
2399- }
2400+
2401 // otherwise all dodger win.s have passed 0.5 progress
2402-
2403 CompWindow *wCur = wBottommost;
2404+
2405 while (wCur)
2406 {
2407 RestackPersistentData *dataCur =
2408@@ -281,14 +285,11 @@
2409 if (dw && dodgeDataDodger)
2410 {
2411 if (dodgeDataDodger->dodgeChainPrev)
2412- {
2413 wDodgeChainAbove = dodgeDataDodger->dodgeChainPrev;
2414- }
2415 else
2416- {
2417 // Use the wOldAbove of topmost subject
2418 wDodgeChainAbove = mRestackData->restackInfo ()->wOldAbove;
2419- }
2420+
2421 if (!wDodgeChainAbove)
2422 compLogMessage ("animation", CompLogLevelError,
2423 "%s: error at line %d", __FILE__, __LINE__);
2424@@ -318,6 +319,7 @@
2425 // otherwise all dodger win.s have passed 0.5 progress
2426
2427 CompWindow *wCur = wBottommost;
2428+
2429 while (wCur)
2430 {
2431 RestackPersistentData *dataCur =
2432@@ -335,7 +337,7 @@
2433 {
2434 // for dodging windows only, when subject is fixed
2435 return !(mDodgeMode == AnimationOptions::DodgeModeFixedClickedWindow &&
2436- mDodgeData->isDodgeSubject);
2437+ mDodgeData->isDodgeSubject);
2438 }
2439
2440 void
2441@@ -344,11 +346,11 @@
2442 TransformAnim::updateBB (output);
2443 }
2444
2445-DodgeAnim::DodgeAnim (CompWindow *w,
2446- WindowEvent curWindowEvent,
2447- float duration,
2448+DodgeAnim::DodgeAnim (CompWindow *w,
2449+ WindowEvent curWindowEvent,
2450+ float duration,
2451 const AnimEffect info,
2452- const CompRect &icon) :
2453+ const CompRect &icon) :
2454 Animation::Animation (w, curWindowEvent, duration, info, icon),
2455 RestackAnim::RestackAnim (w, curWindowEvent, duration, info, icon),
2456 TransformAnim::TransformAnim (w, curWindowEvent, duration, info, icon),
2457@@ -369,7 +371,7 @@
2458 // Remove this window from its subject's dodger chain
2459 if (mDodgeSubjectWin)
2460 {
2461- CompWindow *w = mDodgeSubjectWin;
2462+ CompWindow *w = mDodgeSubjectWin;
2463 AnimWindow *aw = AnimWindow::get (w);
2464 Animation *curAnim = aw->curAnimation ();
2465 DodgePersistentData *dodgeData = static_cast<DodgePersistentData *>
2466@@ -389,10 +391,12 @@
2467 AnimWindow *adw = AnimWindow::get (dw);
2468 dodgeDataDodger = static_cast<DodgePersistentData *>
2469 (adw->persistentData["dodge"]);
2470+
2471 if (dw == mWindow)
2472 {
2473 // Remove mWindow from the chain
2474 CompWindow *dwNext = dodgeDataDodger->dodgeChainNext;
2475+
2476 if (dwNext)
2477 {
2478 AnimWindow *adwNext = AnimWindow::get (dwNext);
2479@@ -402,7 +406,9 @@
2480 dodgeDataDodgerNext->dodgeChainPrev =
2481 dodgeDataDodger->dodgeChainPrev;
2482 }
2483+
2484 CompWindow *dwPrev = dodgeDataDodger->dodgeChainPrev;
2485+
2486 if (dwPrev)
2487 {
2488 AnimWindow *adwPrev = AnimWindow::get (dwPrev);
2489@@ -412,9 +418,11 @@
2490 dodgeDataDodgerPrev->dodgeChainNext =
2491 dodgeDataDodger->dodgeChainNext;
2492 }
2493+
2494 if (dodgeData->dodgeChainStart == mWindow)
2495 dodgeData->dodgeChainStart =
2496 dodgeDataDodger->dodgeChainNext;
2497+
2498 dodgeDataDodger->dodgeChainPrev = 0;
2499 dodgeDataDodger->dodgeChainNext = 0;
2500 }
2501@@ -431,12 +439,15 @@
2502 // Update this window's dodgers so that they no longer point
2503 // to this window as their subject
2504 DodgePersistentData *dodgeDataDodger;
2505+
2506 for (CompWindow *dw = dodgeData->dodgeChainStart; dw;
2507 dw = dodgeDataDodger->dodgeChainNext)
2508 {
2509 AnimWindow *adw = AnimWindow::get (dw);
2510+
2511 if (!adw)
2512 break;
2513+
2514 dodgeDataDodger = static_cast<DodgePersistentData *>
2515 (adw->persistentData["dodge"]);
2516
2517@@ -445,6 +456,7 @@
2518 if (curAnim && curAnim->info () == AnimEffectDodge)
2519 {
2520 DodgeAnim *animDodger = dynamic_cast<DodgeAnim *> (curAnim);
2521+
2522 if (animDodger->mDodgeSubjectWin == mWindow)
2523 animDodger->mDodgeSubjectWin = NULL;
2524 }
2525@@ -463,8 +475,8 @@
2526 }
2527
2528 int
2529-DodgeAnim::getDodgeAmount (CompRect &rect,
2530- CompWindow *dw,
2531+DodgeAnim::getDodgeAmount (CompRect &rect,
2532+ CompWindow *dw,
2533 DodgeDirection dir)
2534 {
2535 CompRect dRect (dw->borderRect ().x () +
2536@@ -477,23 +489,29 @@
2537 dw->outputRect ().height ()) / 2);
2538
2539 int amount = 0;
2540+
2541 switch (dir)
2542 {
2543 case DodgeDirectionUp:
2544 amount = (rect.y () - (dRect.y () + dRect.height ()));
2545 break;
2546+
2547 case DodgeDirectionDown:
2548 amount = (rect.y () + rect.height () - dRect.y ());
2549 break;
2550+
2551 case DodgeDirectionLeft:
2552 amount = (rect.x () - (dRect.x () + dRect.width ()));
2553 break;
2554+
2555 case DodgeDirectionRight:
2556 amount = (rect.x () + rect.width () - dRect.x ());
2557 break;
2558+
2559 default:
2560 break;
2561 }
2562+
2563 return amount;
2564 }
2565
2566@@ -501,41 +519,49 @@
2567 DodgeAnim::processCandidate (CompWindow *candidateWin,
2568 CompWindow *subjectWin,
2569 CompRegion &candidateAndSubjectIntersection,
2570- int &numSelectedCandidates)
2571+ int &numSelectedCandidates)
2572 {
2573 AnimWindow *aCandidateWin = AnimWindow::get (candidateWin);
2574- AnimScreen *as = AnimScreen::get (::screen);
2575+ AnimScreen *as = AnimScreen::get (::screen);
2576
2577 if ((!aCandidateWin->curAnimation () ||
2578 aCandidateWin->curAnimation ()->info () == AnimEffectDodge) &&
2579 candidateWin != subjectWin) // don't let the subject dodge itself
2580 {
2581 // Mark this window for dodge
2582-
2583 bool nonMatching = false;
2584+
2585 if (as->getMatchingAnimSelection (candidateWin, AnimEventFocus, 0) !=
2586 AnimEffectDodge)
2587 nonMatching = true;
2588
2589- ++numSelectedCandidates;
2590+<<<<<<< TREE
2591+ ++numSelectedCandidates;
2592+=======
2593+ ++numSelectedCandidates;
2594+
2595+>>>>>>> MERGE-SOURCE
2596 DodgePersistentData *data = static_cast<DodgePersistentData *>
2597 (aCandidateWin->persistentData["dodge"]);
2598+
2599 data->dodgeOrder = numSelectedCandidates;
2600+
2601 if (nonMatching) // Use neg. values for non-matching windows
2602 data->dodgeOrder *= -1;
2603 }
2604 }
2605
2606 void
2607-DodgeAnim::postInitiateRestackAnim (int numSelectedCandidates,
2608- int duration,
2609+DodgeAnim::postInitiateRestackAnim (int numSelectedCandidates,
2610+ int duration,
2611 CompWindow *wStart,
2612 CompWindow *wEnd,
2613- bool raised)
2614+ bool raised)
2615 {
2616 DodgePersistentData *dataSubject = mDodgeData;
2617+
2618 if (!dataSubject)
2619- return;
2620+ return;
2621
2622 dataSubject->isDodgeSubject = true;
2623 dataSubject->dodgeChainStart = 0;
2624@@ -564,11 +590,13 @@
2625 // Initiate dodge for this window
2626
2627 bool stationaryDodger = false;
2628+
2629 if (dataDodger->dodgeOrder < 0)
2630 {
2631 dataDodger->dodgeOrder *= -1; // Make it positive again
2632 stationaryDodger = true;
2633 }
2634+
2635 if (!adw->curAnimation ())
2636 {
2637 // Create dodge animation for dodger
2638@@ -579,8 +607,7 @@
2639 extPlugin->incrementCurRestackAnimCount ();
2640 }
2641
2642- DodgeAnim *animDodger =
2643- dynamic_cast<DodgeAnim *> (adw->curAnimation ());
2644+ DodgeAnim *animDodger = dynamic_cast<DodgeAnim *> (adw->curAnimation ());
2645
2646 animDodger->mDodgeSubjectWin = mWindow;
2647
2648@@ -598,8 +625,7 @@
2649 (1 - (float)dataDodger->dodgeOrder / numSelectedCandidates);
2650 }
2651
2652- float transformTotalProgress =
2653- 1 + animDodger->mTransformStartProgress;
2654+ float transformTotalProgress = 1 + animDodger->mTransformStartProgress;
2655
2656 if (maxTransformTotalProgress < transformTotalProgress)
2657 maxTransformTotalProgress = transformTotalProgress;
2658@@ -625,17 +651,15 @@
2659 static_cast<DodgePersistentData *>
2660 (AnimWindow::get (wDodgeChainLastVisited)->
2661 persistentData["dodge"]);
2662+
2663 if (raised)
2664- {
2665 dataDodgeChainLastVisited->dodgeChainNext = dw;
2666- }
2667 else
2668 dataDodgeChainLastVisited->dodgeChainPrev = dw;
2669 }
2670 else if (raised) // mark chain start
2671- {
2672 dataSubject->dodgeChainStart = dw;
2673- }
2674+
2675 if (raised)
2676 {
2677 dataDodger->dodgeChainPrev = wDodgeChainLastVisited;
2678@@ -679,6 +703,7 @@
2679 // Go through each dodger, calculating its dodge amount.
2680 // dw: Dodger window
2681 DodgePersistentData *dodgeDataDodger;
2682+
2683 for (CompWindow *dw = mDodgeData->dodgeChainStart; dw;
2684 dw = dodgeDataDodger->dodgeChainNext)
2685 {
2686@@ -687,8 +712,8 @@
2687 dodgeDataDodger = static_cast<DodgePersistentData *>
2688 (adw->persistentData["dodge"]);
2689
2690- DodgeAnim *animDodger =
2691- dynamic_cast<DodgeAnim *> (adw->curAnimation ());
2692+ DodgeAnim *animDodger = dynamic_cast<DodgeAnim *> (adw->curAnimation ());
2693+
2694 if (!animDodger)
2695 continue;
2696
2697@@ -703,9 +728,15 @@
2698 int amountMinActual = dodgeAmount[0];
2699 int amountMinAbs = abs (amountMinActual);
2700 int iMin = 0;
2701+<<<<<<< TREE
2702 for (int i=1; i < 4; ++i)
2703+=======
2704+
2705+ for (int i = 1; i < 4; ++i)
2706+>>>>>>> MERGE-SOURCE
2707 {
2708 int absAmount = abs (dodgeAmount[i]);
2709+
2710 if (amountMinAbs > absAmount)
2711 {
2712 amountMinAbs = absAmount;
2713@@ -713,11 +744,13 @@
2714 iMin = i;
2715 }
2716 }
2717+
2718 if (iMin == DodgeDirectionUp ||
2719 iMin == DodgeDirectionDown)
2720 {
2721 animDodger->mDodgeMaxAmountX = 0;
2722 animDodger->mDodgeMaxAmountY = dodgeAmount[iMin];
2723+
2724 if (mDodgeMode == AnimationOptions::DodgeModeAllMoving &&
2725 maxDistY < amountMinAbs)
2726 {
2727@@ -729,6 +762,7 @@
2728 {
2729 animDodger->mDodgeMaxAmountX = dodgeAmount[iMin];
2730 animDodger->mDodgeMaxAmountY = 0;
2731+
2732 if (mDodgeMode == AnimationOptions::DodgeModeAllMoving && maxDistX < amountMinAbs)
2733 {
2734 maxDistX = amountMinAbs;
2735@@ -786,13 +820,16 @@
2736 AnimWindow *awCur = AnimWindow::get (wCur);
2737
2738 dataCur = static_cast<RestackPersistentData *>
2739- (awCur->persistentData["restack"]);
2740+ (awCur->persistentData["restack"]);
2741+
2742 if (!dataCur)
2743- break;
2744+ break;
2745
2746 Animation *curAnim = awCur->curAnimation ();
2747+
2748 if (!curAnim || curAnim->info () != AnimEffectDodge)
2749 continue;
2750+
2751 DodgeAnim *dodgeAnim = dynamic_cast<DodgeAnim *> (curAnim);
2752
2753 dodgeAnim->mDodgeMaxAmountX = dodgeAmountX + offsetX;
2754@@ -808,6 +845,7 @@
2755 // subject(s) is dodging in that axis (X or Y).
2756 // dw: Dodger window
2757 DodgePersistentData *dodgeDataDodger;
2758+
2759 for (CompWindow *dw = mDodgeData->dodgeChainStart; dw;
2760 dw = dodgeDataDodger->dodgeChainNext)
2761 {
2762@@ -818,6 +856,7 @@
2763
2764 DodgeAnim *animDodger =
2765 dynamic_cast<DodgeAnim *> (adw->curAnimation ());
2766+
2767 if (!animDodger)
2768 continue;
2769
2770@@ -825,11 +864,9 @@
2771 if (subjectDodgesInX && animDodger->mDodgeMaxAmountX != 0)
2772 {
2773 if (animDodger->mDodgeMaxAmountX *
2774- (animDodger->mDodgeMaxAmountX + dodgeAmountX) < 0)
2775- {
2776- // If the sign is going to change, just reset instead
2777+ (animDodger->mDodgeMaxAmountX + dodgeAmountX) < 0)
2778+ // If the sign is going to change, just reset instead
2779 animDodger->mDodgeMaxAmountX = 0;
2780- }
2781 else
2782 animDodger->mDodgeMaxAmountX += dodgeAmountX;
2783 }
2784@@ -838,13 +875,13 @@
2785 if (subjectDodgesInY && animDodger->mDodgeMaxAmountY != 0)
2786 {
2787 if (animDodger->mDodgeMaxAmountY *
2788- (animDodger->mDodgeMaxAmountY + dodgeAmountY) < 0)
2789+ (animDodger->mDodgeMaxAmountY + dodgeAmountY) < 0)
2790 {
2791- // If the sign is going to change, just reset instead
2792+ // If the sign is going to change, just reset instead
2793 animDodger->mDodgeMaxAmountY = 0;
2794 }
2795 else
2796- animDodger->mDodgeMaxAmountY += dodgeAmountY;
2797+ animDodger->mDodgeMaxAmountY += dodgeAmountY;
2798 }
2799 }
2800 }
2801@@ -873,4 +910,3 @@
2802 dodgeChainNext (0)
2803 {
2804 }
2805-
2806
2807=== modified file 'plugins/animation/src/dream.cpp'
2808--- plugins/animation/src/dream.cpp 2013-04-25 11:07:54 +0000
2809+++ plugins/animation/src/dream.cpp 2013-07-21 23:03:28 +0000
2810@@ -40,11 +40,11 @@
2811
2812 // ===================== Effect: Dream =========================
2813
2814-DreamAnim::DreamAnim (CompWindow *w,
2815- WindowEvent curWindowEvent,
2816- float duration,
2817+DreamAnim::DreamAnim (CompWindow *w,
2818+ WindowEvent curWindowEvent,
2819+ float duration,
2820 const AnimEffect info,
2821- const CompRect &icon) :
2822+ const CompRect &icon) :
2823 Animation::Animation (w, curWindowEvent, duration, info, icon),
2824 TransformAnim::TransformAnim (w, curWindowEvent, duration, info, icon),
2825 GridZoomAnim::GridZoomAnim (w, curWindowEvent, duration, info, icon)
2826@@ -74,7 +74,7 @@
2827 void
2828 DreamAnim::initGrid ()
2829 {
2830- mGridWidth = 2;
2831+ mGridWidth = 2;
2832 mGridHeight = optValI (AnimationOptions::MagicLampWavyGridRes); // TODO new option
2833 }
2834
2835@@ -98,16 +98,21 @@
2836 int wx = winRect.x ();
2837 int wy = winRect.y ();
2838
2839- int owidth = outRect.width ();
2840+ int owidth = outRect.width ();
2841 int oheight = outRect.height ();
2842
2843 float waveAmpMax = MIN (oheight, owidth) * 0.125f;
2844- float waveWidth = 10.0f;
2845- float waveSpeed = 7.0f;
2846+ float waveWidth = 10.0f;
2847+ float waveSpeed = 7.0f;
2848
2849 GridModel::GridObject *object = mModel->objects ();
2850 unsigned int n = mModel->numObjects ();
2851- for (unsigned int i = 0; i < n; ++i, ++object)
2852+<<<<<<< TREE
2853+ for (unsigned int i = 0; i < n; ++i, ++object)
2854+=======
2855+
2856+ for (unsigned int i = 0; i < n; ++i, ++object)
2857+>>>>>>> MERGE-SOURCE
2858 {
2859 Point3d &objPos = object->position ();
2860 Point &objGridPos = object->gridPosition ();
2861@@ -132,8 +137,7 @@
2862 objPos.setX (
2863 origx +
2864 forwardProgress * waveAmpMax * mModel->scale ().x () *
2865- sin (objGridPos.y () * M_PI * waveWidth +
2866- waveSpeed * forwardProgress));
2867+ sin (objGridPos.y () * M_PI * waveWidth + waveSpeed * forwardProgress));
2868 }
2869 }
2870
2871@@ -153,4 +157,3 @@
2872 mCurWindowEvent == WindowEventUnminimize) &&
2873 optValB (AnimationOptions::DreamZoomToTaskbar));
2874 }
2875-
2876
2877=== modified file 'plugins/animation/src/extensionplugin.cpp'
2878--- plugins/animation/src/extensionplugin.cpp 2013-04-25 11:07:54 +0000
2879+++ plugins/animation/src/extensionplugin.cpp 2013-07-21 23:03:28 +0000
2880@@ -38,11 +38,11 @@
2881
2882
2883 ExtensionPluginAnimation::ExtensionPluginAnimation
2884- (const CompString &name,
2885- unsigned int nEffects,
2886- AnimEffect *effects,
2887+ (const CompString &name,
2888+ unsigned int nEffects,
2889+ AnimEffect *effects,
2890 CompOption::Vector *effectOptions,
2891- unsigned int firstEffectOptionIndex) :
2892+ unsigned int firstEffectOptionIndex) :
2893 ExtensionPluginInfo (name, nEffects, effects, effectOptions,
2894 firstEffectOptionIndex),
2895 mAWinWasRestackedJustNow (false),
2896@@ -64,8 +64,8 @@
2897 void
2898 ExtensionPluginAnimation::cleanUpParentChildChainItem (AnimWindow *aw)
2899 {
2900- PersistentDataMap::iterator itData =
2901- aw->persistentData.find ("restack");
2902+ PersistentDataMap::iterator itData = aw->persistentData.find ("restack");
2903+
2904 if (itData != aw->persistentData.end ()) // if found
2905 {
2906 RestackPersistentData *restackData =
2907@@ -77,15 +77,18 @@
2908 RestackPersistentData *dataOther = static_cast<RestackPersistentData *>
2909 (AnimWindow::get (restackData->mWinThisIsPaintedBefore)->
2910 persistentData["restack"]);
2911+
2912 if (dataOther)
2913 dataOther->mWinToBePaintedBeforeThis = 0;
2914 }
2915+
2916 restackData->mWinThisIsPaintedBefore = 0;
2917 restackData->mMoreToBePaintedPrev = 0;
2918 restackData->mMoreToBePaintedNext = 0;
2919 }
2920
2921 itData = aw->persistentData.find ("dodge");
2922+
2923 if (itData != aw->persistentData.end ()) // if found
2924 {
2925 DodgePersistentData *dodgeData =
2926@@ -99,8 +102,9 @@
2927 bool
2928 ExtensionPluginAnimation::paintShouldSkipWindow (CompWindow *w)
2929 {
2930- AnimWindow *aw = AnimWindow::get (w);
2931+ AnimWindow *aw = AnimWindow::get (w);
2932 PersistentDataMap::iterator itData = aw->persistentData.find ("restack");
2933+
2934 if (itData != aw->persistentData.end ()) // if found
2935 {
2936 RestackPersistentData *data =
2937@@ -115,6 +119,7 @@
2938 dynamic_cast<RestackAnim *> (aw->curAnimation ())->paintedElsewhere ())
2939 return true;
2940 }
2941+
2942 return false;
2943 }
2944
2945@@ -123,6 +128,7 @@
2946 ExtensionPluginAnimation::relevantForRestackAnim (CompWindow *w)
2947 {
2948 unsigned int wmType = w->wmType ();
2949+
2950 if (!((wmType &
2951 // these two are to be used as "host" windows
2952 // to host the painting of windows being focused
2953@@ -144,30 +150,33 @@
2954 if (!mAWinWasRestackedJustNow)
2955 return;
2956
2957- bool focusAnimInitiated = false;
2958- AnimScreen *as = AnimScreen::get (::screen);
2959+ bool focusAnimInitiated = false;
2960+ AnimScreen *as = AnimScreen::get (::screen);
2961
2962 // Go in reverse order so that restack chains are handled properly
2963 for (CompWindowVector::reverse_iterator rit = mLastClientList.rbegin ();
2964 rit != mLastClientList.rend (); ++rit)
2965 {
2966- CompWindow *w = (*rit);
2967+ CompWindow *w = (*rit);
2968 AnimWindow *aw = AnimWindow::get (w);
2969 RestackPersistentData *data = static_cast<RestackPersistentData *>
2970 (aw->persistentData["restack"]);
2971+
2972 if (!data)
2973 continue;
2974+
2975 RestackInfo *restackInfo = data->restackInfo ();
2976+
2977 if (!restackInfo)
2978 continue;
2979
2980 data->mIsSecondary = false;
2981
2982- if (as->otherPluginsActive () ||
2983+ if (as->otherPluginsActive () ||
2984 // Don't initiate focus anim for current dodgers
2985- aw->curAnimation () ||
2986+ aw->curAnimation () ||
2987 // Don't initiate focus anim for windows being passed thru
2988- data->mWinPassingThrough ||
2989+ data->mWinPassingThrough ||
2990 // Don't animate with stale restack info
2991 !restackInfoStillGood (restackInfo))
2992 {
2993@@ -177,11 +186,10 @@
2994
2995 // Find the first window at a higher stacking order than w
2996 CompWindow *nw;
2997+
2998 for (nw = w->next; nw; nw = nw->next)
2999- {
3000 if (relevantForRestackAnim (nw))
3001 break;
3002- }
3003
3004 // If w is being lowered, there has to be a window
3005 // at a higher stacking position than w (like a panel)
3006@@ -208,7 +216,7 @@
3007 if (dataNext && dataNext->restackInfo () &&
3008 wontCreateCircularChain (w, nw))
3009 {
3010- // Link the two
3011+ // Link the two
3012 dataNext->mMoreToBePaintedPrev = w;
3013 data->mMoreToBePaintedNext = nw;
3014
3015@@ -233,10 +241,12 @@
3016 AnimWindow *aw = AnimWindow::get (w);
3017 RestackPersistentData *data = static_cast<RestackPersistentData *>
3018 (aw->persistentData["restack"]);
3019+
3020 if (!data)
3021 continue;
3022
3023 RestackInfo *restackInfo = data->restackInfo ();
3024+
3025 if (restackInfo)
3026 {
3027 if (as->initiateFocusAnim (aw))
3028@@ -249,22 +259,24 @@
3029 if (!focusAnimInitiated)
3030 resetStackingInfo ();
3031
3032- if (!focusAnimInitiated ||
3033- as->otherPluginsActive () ||
3034+ if (!focusAnimInitiated ||
3035+ as->otherPluginsActive () ||
3036 !as->isAnimEffectPossible (AnimEffectDodge)) // Only dodge stuff below
3037 return;
3038
3039 // Calculate dodge amounts
3040 foreach (CompWindow *w, mLastClientList)
3041 {
3042- AnimWindow *aw = AnimWindow::get (w);
3043- Animation *curAnim = aw->curAnimation ();
3044+ AnimWindow *aw = AnimWindow::get (w);
3045+ Animation *curAnim = aw->curAnimation ();
3046+
3047 if (!curAnim || curAnim->info () != AnimEffectDodge)
3048 continue;
3049
3050 // Only process subjects with a dodge chain
3051 DodgePersistentData *dodgeData = static_cast<DodgePersistentData *>
3052 (aw->persistentData["dodge"]);
3053+
3054 if (!dodgeData || !dodgeData->dodgeChainStart ||
3055 !dodgeData->isDodgeSubject)
3056 continue;
3057@@ -276,30 +288,36 @@
3058 for (CompWindowVector::reverse_iterator rit = mLastClientList.rbegin ();
3059 rit != mLastClientList.rend (); ++rit)
3060 {
3061- CompWindow *w = (*rit);
3062- AnimWindow *aw = AnimWindow::get (w);
3063+ CompWindow *w = (*rit);
3064+ AnimWindow *aw = AnimWindow::get (w);
3065 PersistentDataMap::iterator itData = aw->persistentData.find ("dodge");
3066+
3067 if (itData == aw->persistentData.end ()) // if not found
3068 continue;
3069
3070 DodgePersistentData *data = static_cast<DodgePersistentData *>
3071 (itData->second);
3072+
3073 if (!data->isDodgeSubject)
3074 continue;
3075
3076 bool dodgersAreOnlySubjects = true;
3077 CompWindow *dw;
3078 DodgePersistentData *dataDodger;
3079+
3080 for (dw = data->dodgeChainStart; dw;
3081 dw = dataDodger->dodgeChainNext)
3082 {
3083 dataDodger = static_cast<DodgePersistentData *>
3084 (AnimWindow::get (dw)->persistentData["dodge"]);
3085+
3086 if (!dataDodger)
3087 break;
3088+
3089 if (!dataDodger->isDodgeSubject)
3090 dodgersAreOnlySubjects = false;
3091 }
3092+
3093 if (dodgersAreOnlySubjects)
3094 data->skipPostPrepareScreen = true;
3095 }
3096@@ -312,24 +330,23 @@
3097
3098 // Only handle restack notifies when the window is (or was) on the client
3099 // list (i.e. not for menus, combos, etc.).
3100- if (find (clients.begin (), clients.end (), aw->mWindow) ==
3101- clients.end () &&
3102- find (mLastClientList.begin (), mLastClientList.end (), aw->mWindow) ==
3103- mLastClientList.end ())
3104+ if (find (clients.begin (), clients.end (), aw->mWindow) == clients.end () &&
3105+ find (mLastClientList.begin (), mLastClientList.end (), aw->mWindow) ==
3106+ mLastClientList.end ())
3107 return;
3108
3109 bool winOpenedClosed = false;
3110 unsigned int n = clients.size ();
3111
3112 if (n != mLastClientList.size ())
3113- {
3114 winOpenedClosed = true;
3115- }
3116+
3117 // if restacking occurred and not window open/close
3118 if (!winOpenedClosed)
3119 {
3120 RestackPersistentData *data = static_cast<RestackPersistentData *>
3121 (aw->persistentData["restack"]);
3122+
3123 data->mConfigureNotified = true;
3124
3125 // Find which window is restacked
3126@@ -394,9 +411,9 @@
3127 bool preferRaised = false;
3128 bool onlyTwo = false;
3129
3130- if (wChangeEnd &&
3131+ if (wChangeEnd &&
3132 clients[(unsigned)changeEnd] ==
3133- mLastClientList[(unsigned)changeStart] &&
3134+ mLastClientList[(unsigned)changeStart] &&
3135 clients[(unsigned)changeStart] ==
3136 mLastClientList[(unsigned)changeEnd])
3137 {
3138@@ -406,6 +423,7 @@
3139 static_cast<RestackPersistentData *>
3140 (AnimWindow::get (wChangeEnd)->
3141 persistentData["restack"]);
3142+
3143 if (data->mConfigureNotified)
3144 preferRaised = true;
3145
3146@@ -417,6 +435,7 @@
3147 RestackPersistentData *data =
3148 static_cast<RestackPersistentData *>
3149 (AnimWindow::get (w2)->persistentData["restack"]);
3150+
3151 data->mConfigureNotified = false;
3152 }
3153
3154@@ -445,11 +464,10 @@
3155 wEnd = wChangeEnd;
3156 wOldAbove = mLastClientList[(unsigned)(changeEnd + 1)];
3157 }
3158+
3159 for (; wOldAbove; wOldAbove = wOldAbove->next)
3160- {
3161 if (!wOldAbove->destroyed ())
3162 break;
3163- }
3164 }
3165
3166 if (wRestacked && wStart && wEnd && wOldAbove)
3167@@ -500,7 +518,7 @@
3168
3169 void
3170 ExtensionPluginAnimation::postUpdateEventEffects (AnimEvent e,
3171- bool forRandom)
3172+ bool forRandom)
3173 {
3174 AnimScreen *as = AnimScreen::get (::screen);
3175
3176@@ -521,9 +539,11 @@
3177 if (aw->persistentData.find ("restack") !=
3178 aw->persistentData.end ())
3179 continue;
3180+
3181 aw->persistentData["restack"] = new RestackPersistentData ();
3182 }
3183 }
3184+
3185 if (as->isAnimEffectPossible (AnimEffectDodge))
3186 {
3187 foreach (CompWindow *w, CompositeScreen::get (::screen)->getWindowPaintList ())
3188@@ -533,6 +553,7 @@
3189 if (aw->persistentData.find ("dodge") !=
3190 aw->persistentData.end ())
3191 continue;
3192+
3193 aw->persistentData["dodge"] = new DodgePersistentData ();
3194 }
3195 }
3196@@ -550,19 +571,15 @@
3197 if (as->isRestackAnimPossible () &&
3198 // doesn't exist yet
3199 aw->persistentData.find ("restack") == aw->persistentData.end ())
3200- {
3201 aw->persistentData["restack"] = new RestackPersistentData ();
3202- }
3203+
3204 if (as->isAnimEffectPossible (AnimEffectDodge) &&
3205 // doesn't exist yet
3206 aw->persistentData.find ("dodge") == aw->persistentData.end ())
3207- {
3208 aw->persistentData["dodge"] = new DodgePersistentData ();
3209- }
3210+
3211 if (aw->persistentData.find ("multi") == aw->persistentData.end ())
3212- {
3213 aw->persistentData["multi"] = new MultiPersistentData ();
3214- }
3215 }
3216
3217 void
3218@@ -595,9 +612,9 @@
3219 bool
3220 ExtensionPluginAnimation::restackInfoStillGood (RestackInfo *restackInfo)
3221 {
3222- bool wStartGood = false;
3223- bool wEndGood = false;
3224- bool wOldAboveGood = false;
3225+ bool wStartGood = false;
3226+ bool wEndGood = false;
3227+ bool wOldAboveGood = false;
3228 bool wRestackedGood = false;
3229
3230 foreach (CompWindow *w, CompositeScreen::get (::screen)->getWindowPaintList ())
3231@@ -609,13 +626,17 @@
3232
3233 if (restackInfo->wStart == w)
3234 wStartGood = true;
3235+
3236 if (restackInfo->wEnd == w)
3237 wEndGood = true;
3238+
3239 if (restackInfo->wRestacked == w)
3240 wRestackedGood = true;
3241+
3242 if (restackInfo->wOldAbove == w)
3243 wOldAboveGood = true;
3244 }
3245+
3246 return (wStartGood && wEndGood && wOldAboveGood && wRestackedGood);
3247 }
3248
3249@@ -626,13 +647,15 @@
3250 foreach (CompWindow *w, CompositeScreen::get (::screen)->getWindowPaintList ())
3251 {
3252 AnimWindow *aw = AnimWindow::get (w);
3253- PersistentDataMap::iterator itData =
3254- aw->persistentData.find ("restack");
3255+ PersistentDataMap::iterator itData = aw->persistentData.find ("restack");
3256+
3257 if (itData != aw->persistentData.end ()) // if found
3258 {
3259 RestackPersistentData *data =
3260 static_cast<RestackPersistentData *> (itData->second);
3261+
3262 data->mConfigureNotified = false;
3263+
3264 if (data->restackInfo ())
3265 data->resetRestackInfo ();
3266 }
3267@@ -654,8 +677,8 @@
3268 ::screen->clientList ().end (), aw->mWindow) !=
3269 ::screen->clientList ().end ())
3270 {
3271- resetStackingInfo ();
3272- updateLastClientList ();
3273+ resetStackingInfo ();
3274+ updateLastClientList ();
3275 }
3276 }
3277
3278@@ -704,7 +727,9 @@
3279
3280 RestackPersistentData *dataBottommost = static_cast<RestackPersistentData *>
3281 (AnimWindow::get (wBottommost)->persistentData["restack"]);
3282+
3283 CompWindow *wPrev = dataBottommost->mMoreToBePaintedPrev;
3284+
3285 while (wPrev)
3286 {
3287 wBottommost = wPrev;
3288@@ -712,6 +737,7 @@
3289 (AnimWindow::get (wPrev)->persistentData["restack"]);
3290 wPrev = dataPrev->mMoreToBePaintedPrev;
3291 }
3292+
3293 return wBottommost;
3294 }
3295
3296@@ -720,14 +746,16 @@
3297 CompWindow *
3298 ExtensionPluginAnimation::getBottommostInRestackChain (CompWindow *wStartPoint)
3299 {
3300- CompWindow *wBottommost = wStartPoint;
3301+ CompWindow *wBottommost = wStartPoint;
3302 RestackPersistentData *dataCur;
3303+
3304 for (CompWindow *wCur = wStartPoint; wCur;
3305 wCur = dataCur->mMoreToBePaintedPrev)
3306 {
3307 wBottommost = wCur;
3308 dataCur = static_cast<RestackPersistentData *>
3309 (AnimWindow::get (wCur)->persistentData["restack"]);
3310+
3311 if (!dataCur)
3312 break;
3313 }
3314@@ -758,12 +786,18 @@
3315 resetMarks ();
3316
3317 CompWindow *w =
3318- getBottommostInExtendedFocusChain (*CompositeScreen::get (::screen)->getWindowPaintList ().begin ());
3319+ getBottommostInExtendedFocusChain (*CompositeScreen::get (::screen)->getWindowPaintList ().begin ());
3320+
3321 if (w)
3322 {
3323 RestackPersistentData *data = static_cast<RestackPersistentData *>
3324 (AnimWindow::get (w)->persistentData["restack"]);
3325- ++data->mVisitCount;
3326+<<<<<<< TREE
3327+ ++data->mVisitCount;
3328+=======
3329+
3330+ ++data->mVisitCount;
3331+>>>>>>> MERGE-SOURCE
3332 }
3333 return w;
3334 }
3335@@ -781,6 +815,7 @@
3336 data->mWalkerOverNewCopy = true;
3337 return true;
3338 }
3339+
3340 return false;
3341 }
3342
3343@@ -796,13 +831,9 @@
3344 {
3345 // Within a chain? (not the 1st or 2nd window)
3346 if (data->mMoreToBePaintedNext)
3347- {
3348 wRet = data->mMoreToBePaintedNext;
3349- }
3350 else if (data->mWinThisIsPaintedBefore) // 2nd one in chain?
3351- {
3352 wRet = data->mWinThisIsPaintedBefore;
3353- }
3354 }
3355 else
3356 data->mWalkerOverNewCopy = false;
3357@@ -823,6 +854,7 @@
3358
3359 ++dataRet->mVisitCount;
3360 }
3361+
3362 return wRet;
3363 }
3364
3365@@ -830,9 +862,9 @@
3366 ExtensionPluginAnimation::getWindowPaintList ()
3367 {
3368 mWindowList.clear ();
3369+
3370 for (CompWindow *w = walkFirst (); w; w = walkNext (w))
3371 mWindowList.push_back (w);
3372
3373 return mWindowList;
3374 }
3375-
3376
3377=== modified file 'plugins/animation/src/fade.cpp'
3378--- plugins/animation/src/fade.cpp 2013-02-27 11:33:10 +0000
3379+++ plugins/animation/src/fade.cpp 2013-07-21 23:03:28 +0000
3380@@ -38,11 +38,11 @@
3381
3382 // ===================== Effect: Fade =========================
3383
3384-FadeAnim::FadeAnim (CompWindow *w,
3385- WindowEvent curWindowEvent,
3386- float duration,
3387+FadeAnim::FadeAnim (CompWindow *w,
3388+ WindowEvent curWindowEvent,
3389+ float duration,
3390 const AnimEffect info,
3391- const CompRect &icon) :
3392+ const CompRect &icon) :
3393 Animation::Animation (w, curWindowEvent, duration, info, icon)
3394 {
3395 }
3396@@ -58,4 +58,3 @@
3397 {
3398 mAWindow->expandBBWithWindow ();
3399 }
3400-
3401
3402=== modified file 'plugins/animation/src/focusfade.cpp'
3403--- plugins/animation/src/focusfade.cpp 2013-02-27 11:33:10 +0000
3404+++ plugins/animation/src/focusfade.cpp 2013-07-21 23:03:28 +0000
3405@@ -55,14 +55,14 @@
3406 FocusFadeAnim::computeOpacity (GLushort opacityInt)
3407 {
3408 float progress = 1 - progressLinear ();
3409- float opacity = opacityInt / (float)OPAQUE;
3410+ float opacity = opacityInt / (float)OPAQUE;
3411 float multiplier;
3412
3413 bool newCopy = overNewCopy ();
3414
3415 // flip opacity behavior for the other side of the cross-fade
3416 if (newCopy)
3417- progress = 1 - progress;
3418+ progress = 1 - progress;
3419
3420 if (mWindow->alpha () || (newCopy && opacity >= 0.91f))
3421 multiplier = progressDecelerate (progress);
3422@@ -81,10 +81,10 @@
3423 else
3424 multiplier = progress;
3425
3426- multiplier = 1 - multiplier;
3427+ multiplier = 1 - multiplier;
3428 float finalOpacity = opacity * multiplier;
3429- finalOpacity = MIN (finalOpacity, 1);
3430- finalOpacity = MAX (finalOpacity, 0);
3431+ finalOpacity = MIN (finalOpacity, 1);
3432+ finalOpacity = MAX (finalOpacity, 0);
3433
3434 return (GLushort)(finalOpacity * OPAQUE);
3435 }
3436@@ -99,7 +99,7 @@
3437 FocusFadeAnim::processCandidate (CompWindow *candidateWin,
3438 CompWindow *subjectWin,
3439 CompRegion &candidateAndSubjectIntersection,
3440- int &numSelectedCandidates)
3441+ int &numSelectedCandidates)
3442 {
3443 AnimWindow *aCandidateWin = AnimWindow::get (candidateWin);
3444 RestackPersistentData *data = static_cast<RestackPersistentData *>
3445@@ -117,10 +117,12 @@
3446 {
3447 AnimWindow *aw = AnimWindow::get (w);
3448 PersistentDataMap::iterator itData = aw->persistentData.find ("restack");
3449+
3450 if (itData != aw->persistentData.end ()) // if found
3451 {
3452 RestackPersistentData *data =
3453 static_cast<RestackPersistentData *> (itData->second);
3454+
3455 if (data->mWinPassingThrough == mWindow)
3456 data->mWinPassingThrough = 0;
3457 }
3458@@ -128,4 +130,3 @@
3459
3460 RestackAnim::cleanUp (closing, destructing);
3461 }
3462-
3463
3464=== modified file 'plugins/animation/src/glide.cpp'
3465--- plugins/animation/src/glide.cpp 2013-04-25 11:07:54 +0000
3466+++ plugins/animation/src/glide.cpp 2013-07-21 23:03:28 +0000
3467@@ -38,11 +38,11 @@
3468
3469 // ===================== Effect: Glide =========================
3470
3471-GlideAnim::GlideAnim (CompWindow *w,
3472- WindowEvent curWindowEvent,
3473- float duration,
3474+GlideAnim::GlideAnim (CompWindow *w,
3475+ WindowEvent curWindowEvent,
3476+ float duration,
3477 const AnimEffect info,
3478- const CompRect &icon) :
3479+ const CompRect &icon) :
3480 Animation::Animation (w, curWindowEvent, duration, info, icon),
3481 TransformAnim::TransformAnim (w, curWindowEvent, duration, info, icon),
3482 ZoomAnim::ZoomAnim (w, curWindowEvent, duration, info, icon),
3483@@ -50,11 +50,11 @@
3484 {
3485 }
3486
3487-Glide2Anim::Glide2Anim (CompWindow *w,
3488- WindowEvent curWindowEvent,
3489- float duration,
3490+Glide2Anim::Glide2Anim (CompWindow *w,
3491+ WindowEvent curWindowEvent,
3492+ float duration,
3493 const AnimEffect info,
3494- const CompRect &icon) :
3495+ const CompRect &icon) :
3496 Animation::Animation (w, curWindowEvent, duration, info, icon),
3497 TransformAnim::TransformAnim (w, curWindowEvent, duration, info, icon),
3498 GlideAnim::GlideAnim (w, curWindowEvent, duration, info, icon)
3499@@ -67,7 +67,7 @@
3500 float *thickness)
3501 {
3502 *finalDistFac = optValF (AnimationOptions::Glide1AwayPosition);
3503- *finalRotAng = optValF (AnimationOptions::Glide1AwayAngle);
3504+ *finalRotAng = optValF (AnimationOptions::Glide1AwayAngle);
3505 }
3506
3507 void
3508@@ -76,7 +76,7 @@
3509 float *thickness)
3510 {
3511 *finalDistFac = optValF (AnimationOptions::Glide2AwayPosition);
3512- *finalRotAng = optValF (AnimationOptions::Glide2AwayAngle);
3513+ *finalRotAng = optValF (AnimationOptions::Glide2AwayAngle);
3514 }
3515
3516 float
3517@@ -128,7 +128,7 @@
3518 0, 0);
3519 GLVector translation (0, 0, finalz * forwardProgress, 0);
3520
3521- float rotAngle = finalRotAng * forwardProgress;
3522+ float rotAngle = finalRotAng * forwardProgress;
3523 glideModRotAngle = fmodf (rotAngle + 720, 360.0f);
3524
3525 // put back to window position
3526
3527=== modified file 'plugins/animation/src/grid.cpp'
3528--- plugins/animation/src/grid.cpp 2013-04-25 11:07:54 +0000
3529+++ plugins/animation/src/grid.cpp 2013-07-21 23:03:28 +0000
3530@@ -54,18 +54,18 @@
3531 mGridPosition = gridPosition;
3532 }
3533
3534-GridAnim::GridModel::GridModel (CompWindow *w,
3535+GridAnim::GridModel::GridModel (CompWindow *w,
3536 WindowEvent curWindowEvent,
3537- int height,
3538- int gridWidth,
3539- int gridHeight,
3540- int decorTopHeight,
3541- int decorBottomHeight) :
3542+ int height,
3543+ int gridWidth,
3544+ int gridHeight,
3545+ int decorTopHeight,
3546+ int decorBottomHeight) :
3547 mScale (1.0f, 1.0f),
3548 mScaleOrigin (0, 0)
3549 {
3550 mNumObjects = (unsigned)(gridWidth * gridHeight);
3551- mObjects = new GridObject[mNumObjects];
3552+ mObjects = new GridObject[mNumObjects];
3553
3554 initObjects (curWindowEvent,
3555 height,
3556@@ -80,15 +80,17 @@
3557
3558 void
3559 GridAnim::GridModel::initObjects (WindowEvent curWindowEvent,
3560- int height,
3561- int gridWidth, int gridHeight,
3562- int decorTopHeight, int decorBottomHeight)
3563+ int height,
3564+ int gridWidth,
3565+ int gridHeight,
3566+ int decorTopHeight,
3567+ int decorBottomHeight)
3568 {
3569 int gridX, gridY;
3570- int nGridCellsX, nGridCellsY;
3571+ int nGridCellsY;
3572
3573 // number of grid cells in x direction
3574- nGridCellsX = gridWidth - 1;
3575+ int nGridCellsX = gridWidth - 1;
3576
3577 if (curWindowEvent == WindowEventShade ||
3578 curWindowEvent == WindowEventUnshade)
3579@@ -97,8 +99,7 @@
3580 // One allocated for top, one for bottom.
3581 nGridCellsY = gridHeight - 3;
3582
3583- float winContentsHeight =
3584- height - decorTopHeight - decorBottomHeight;
3585+ float winContentsHeight = height - decorTopHeight - decorBottomHeight;
3586
3587 //Top
3588 for (gridX = 0; gridX < gridWidth; ++gridX)
3589@@ -108,13 +109,12 @@
3590 mObjects[gridX].setGridPosition (gridPos);
3591 }
3592
3593+ float inWinY, gridPosY;
3594 // Window contents
3595 for (gridY = 1; gridY < gridHeight - 1; ++gridY)
3596 {
3597- float inWinY =
3598- (gridY - 1) * winContentsHeight / nGridCellsY +
3599- decorTopHeight;
3600- float gridPosY = inWinY / height;
3601+ inWinY = (gridY - 1) * winContentsHeight / nGridCellsY + decorTopHeight;
3602+ gridPosY = inWinY / height;
3603
3604 for (gridX = 0; gridX < gridWidth; ++gridX)
3605 {
3606@@ -132,7 +132,7 @@
3607 }
3608 else
3609 {
3610- int objIndex = 0;
3611+ int objIndex = 0;
3612
3613 // number of grid cells in y direction
3614 nGridCellsY = gridHeight - 1;
3615@@ -145,7 +145,12 @@
3616 Point gridPos ((float)gridX / nGridCellsX,
3617 (float)gridY / nGridCellsY);
3618 mObjects[objIndex].setGridPosition (gridPos);
3619- ++objIndex;
3620+<<<<<<< TREE
3621+ ++objIndex;
3622+=======
3623+
3624+ ++objIndex;
3625+>>>>>>> MERGE-SOURCE
3626 }
3627 }
3628 }
3629@@ -156,7 +161,12 @@
3630 float ty)
3631 {
3632 GridObject *object = mObjects;
3633- for (unsigned int i = 0; i < mNumObjects; ++i, ++object)
3634+<<<<<<< TREE
3635+ for (unsigned int i = 0; i < mNumObjects; ++i, ++object)
3636+=======
3637+
3638+ for (unsigned int i = 0; i < mNumObjects; ++i, ++object)
3639+>>>>>>> MERGE-SOURCE
3640 {
3641 object->mPosition.add (Point3d (tx, ty, 0));
3642 }
3643@@ -166,7 +176,12 @@
3644 GridAnim::updateBB (CompOutput &output)
3645 {
3646 GridModel::GridObject *object = mModel->mObjects;
3647- for (unsigned int i = 0; i < mModel->mNumObjects; ++i, ++object)
3648+<<<<<<< TREE
3649+ for (unsigned int i = 0; i < mModel->mNumObjects; ++i, ++object)
3650+=======
3651+
3652+ for (unsigned int i = 0; i < mModel->mNumObjects; ++i, ++object)
3653+>>>>>>> MERGE-SOURCE
3654 {
3655 mAWindow->expandBBWithPoint (object->position ().x () + 0.5,
3656 object->position ().y () + 0.5);
3657@@ -180,11 +195,11 @@
3658 mGridHeight = 2;
3659 }
3660
3661-GridAnim::GridAnim (CompWindow *w,
3662- WindowEvent curWindowEvent,
3663- float duration,
3664+GridAnim::GridAnim (CompWindow *w,
3665+ WindowEvent curWindowEvent,
3666+ float duration,
3667 const AnimEffect info,
3668- const CompRect &icon) :
3669+ const CompRect &icon) :
3670 Animation::Animation (w, curWindowEvent, duration, info, icon),
3671 mModel (NULL),
3672 mUseQTexCoord (false)
3673@@ -259,13 +274,9 @@
3674 mCurWindowEvent == WindowEventUnshade)
3675 {
3676 if (y1 < winContentsY) // if at top part
3677- {
3678 gridH = mDecorTopHeight;
3679- }
3680 else if (y2 > winContentsY + winContentsHeight) // if at bottom
3681- {
3682 gridH = mDecorBottomHeight;
3683- }
3684 else // in window contents (only in Y coords)
3685 {
3686 float winContentsHeight =
3687@@ -282,12 +293,12 @@
3688 v = vertexBuffer->getVertices () + (oldCount * vSize);
3689 vMax = vertexBuffer->getVertices () + (newCount * vSize);
3690
3691+ float x, y, topiyFloat;
3692 // For each vertex
3693 for (; v < vMax; v += vSize)
3694 {
3695- float x = v[0];
3696- float y = v[1];
3697- float topiyFloat;
3698+ x = v[0];
3699+ y = v[1];
3700
3701 if (y > y2)
3702 y = y2;
3703@@ -301,31 +312,34 @@
3704 topiyFloat = MIN (topiyFloat, 0.999); // avoid 1.0
3705 }
3706 else if (y2 > winContentsY + winContentsHeight) // if at bottom
3707- {
3708 topiyFloat = (mGridHeight - 2) +
3709 (mDecorBottomHeight ? (y - winContentsY -
3710 winContentsHeight) /
3711 mDecorBottomHeight : 0);
3712- }
3713 else // in window contents (only in Y coords)
3714- {
3715 topiyFloat = (mGridHeight - 3) *
3716 (y - winContentsY) / winContentsHeight + 1;
3717- }
3718 }
3719 else
3720- {
3721 topiyFloat = (mGridHeight - 1) * (y - oy) / oheight;
3722- }
3723+
3724 // topiy should be at most (mGridHeight - 2)
3725 int topiy = (int)(topiyFloat + 1e-4);
3726
3727 if (topiy == mGridHeight - 1)
3728+<<<<<<< TREE
3729 --topiy;
3730
3731 int bottomiy = topiy + 1;
3732 float iny = topiyFloat - topiy;
3733 float inyRest = 1 - iny;
3734+=======
3735+ --topiy;
3736+
3737+ int bottomiy = topiy + 1;
3738+ float iny = topiyFloat - topiy;
3739+ float inyRest = 1 - iny;
3740+>>>>>>> MERGE-SOURCE
3741
3742 // End of calculations for y
3743
3744@@ -335,8 +349,7 @@
3745 x = x2;
3746
3747 // find containing grid cell (leftix rightix) x (topiy bottomiy)
3748- float leftixFloat =
3749- (mGridWidth - 1) * (x - ox) / owidth;
3750+ float leftixFloat = (mGridWidth - 1) * (x - ox) / owidth;
3751 int leftix = (int)(leftixFloat + 1e-4);
3752
3753 if (leftix == mGridWidth - 1)
3754@@ -399,11 +412,11 @@
3755 // Deprecated
3756 }
3757
3758-GridTransformAnim::GridTransformAnim (CompWindow *w,
3759- WindowEvent curWindowEvent,
3760- float duration,
3761+GridTransformAnim::GridTransformAnim (CompWindow *w,
3762+ WindowEvent curWindowEvent,
3763+ float duration,
3764 const AnimEffect info,
3765- const CompRect &icon) :
3766+ const CompRect &icon) :
3767 Animation::Animation (w, curWindowEvent, duration, info, icon),
3768 TransformAnim::TransformAnim (w, curWindowEvent, duration, info, icon),
3769 GridAnim::GridAnim (w, curWindowEvent, duration, info, icon),
3770@@ -443,7 +456,12 @@
3771 {
3772 GridModel::GridObject *object = mModel->objects ();
3773 unsigned int n = mModel->numObjects ();
3774- for (unsigned int i = 0; i < n; ++i, ++object)
3775+<<<<<<< TREE
3776+ for (unsigned int i = 0; i < n; ++i, ++object)
3777+=======
3778+
3779+ for (unsigned int i = 0; i < n; ++i, ++object)
3780+>>>>>>> MERGE-SOURCE
3781 {
3782 GLVector coords (object->mPosition.x (),
3783 object->mPosition.y (), 0, 1);
3784@@ -471,4 +489,3 @@
3785 wTransform *= skewTransform;
3786 }
3787 }
3788-
3789
3790=== modified file 'plugins/animation/src/horizontalfold.cpp'
3791--- plugins/animation/src/horizontalfold.cpp 2013-04-25 11:07:54 +0000
3792+++ plugins/animation/src/horizontalfold.cpp 2013-07-21 23:03:28 +0000
3793@@ -38,11 +38,11 @@
3794
3795 // ===================== Effect: Horizontal Folds =========================
3796
3797-HorizontalFoldsAnim::HorizontalFoldsAnim (CompWindow *w,
3798- WindowEvent curWindowEvent,
3799- float duration,
3800+HorizontalFoldsAnim::HorizontalFoldsAnim (CompWindow *w,
3801+ WindowEvent curWindowEvent,
3802+ float duration,
3803 const AnimEffect info,
3804- const CompRect &icon) :
3805+ const CompRect &icon) :
3806 Animation::Animation (w, curWindowEvent, duration, info, icon),
3807 TransformAnim::TransformAnim (w, curWindowEvent, duration, info, icon),
3808 FoldAnim::FoldAnim (w, curWindowEvent, duration, info, icon)
3809@@ -53,6 +53,7 @@
3810 HorizontalFoldsAnim::initGrid ()
3811 {
3812 mGridWidth = 2;
3813+
3814 if (mCurWindowEvent == WindowEventShade ||
3815 mCurWindowEvent == WindowEventUnshade)
3816 mGridHeight = 3 + 2 *
3817@@ -64,10 +65,10 @@
3818
3819 float
3820 HorizontalFoldsAnim::getObjectZ (GridAnim::GridModel *mModel,
3821- float forwardProgress,
3822- float sinForProg,
3823- float relDistToFoldCenter,
3824- float foldMaxAmp)
3825+ float forwardProgress,
3826+ float sinForProg,
3827+ float relDistToFoldCenter,
3828+ float foldMaxAmp)
3829 {
3830 return -(sinForProg *
3831 foldMaxAmp *
3832@@ -101,17 +102,15 @@
3833 int oheight = outRect.height ();
3834
3835 float winHeight = 0;
3836+
3837 if (mCurWindowEvent == WindowEventShade ||
3838 mCurWindowEvent == WindowEventUnshade)
3839- {
3840 winHeight = winRect.height ();
3841- }
3842 else
3843- {
3844 winHeight = inRect.height ();
3845- }
3846- int nHalfFolds =
3847- 2.0 * optValI (AnimationOptions::HorizontalFoldsNumFolds);
3848+
3849+ int nHalfFolds = 2.0 * optValI (AnimationOptions::HorizontalFoldsNumFolds);
3850+
3851 float foldMaxAmp =
3852 0.3 * pow ((winHeight / nHalfFolds) / ::screen->height (), 0.3) *
3853 optValF (AnimationOptions::HorizontalFoldsAmpMult);
3854@@ -122,7 +121,12 @@
3855
3856 GridModel::GridObject *object = mModel->objects ();
3857 unsigned int n = mModel->numObjects ();
3858- for (unsigned int i = 0; i < n; ++i, ++object)
3859+<<<<<<< TREE
3860+ for (unsigned int i = 0; i < n; ++i, ++object)
3861+=======
3862+
3863+ for (unsigned int i = 0; i < n; ++i, ++object)
3864+>>>>>>> MERGE-SOURCE
3865 {
3866 Point3d &objPos = object->position ();
3867
3868@@ -134,11 +138,10 @@
3869 float origy = (wy +
3870 (oheight * objGridY -
3871 outExtents.top) * mModel->scale ().y ());
3872+
3873 if (mCurWindowEvent == WindowEventShade ||
3874 mCurWindowEvent == WindowEventUnshade)
3875- {
3876- // Execute shade mode
3877-
3878+ { // Execute shade mode
3879 if (objGridY == 0)
3880 {
3881 objPos.setY (oy);
3882@@ -164,10 +167,8 @@
3883 relDistToFoldCenter, foldMaxAmp));
3884 }
3885 }
3886- else
3887+ else // Execute normal mode
3888 {
3889- // Execute normal mode
3890-
3891 float relDistToFoldCenter = (rowNo % 2 == 0 ? 0.5 : 0);
3892
3893 objPos.setY (
3894@@ -201,4 +202,3 @@
3895 mCurWindowEvent == WindowEventUnminimize) &&
3896 optValB (AnimationOptions::HorizontalFoldsZoomToTaskbar));
3897 }
3898-
3899
3900=== modified file 'plugins/animation/src/magiclamp.cpp'
3901--- plugins/animation/src/magiclamp.cpp 2013-04-25 11:07:54 +0000
3902+++ plugins/animation/src/magiclamp.cpp 2013-07-21 23:03:28 +0000
3903@@ -52,11 +52,11 @@
3904 mGridHeight = optValI (AnimationOptions::MagicLampWavyGridRes);
3905 }
3906
3907-MagicLampAnim::MagicLampAnim (CompWindow *w,
3908- WindowEvent curWindowEvent,
3909- float duration,
3910+MagicLampAnim::MagicLampAnim (CompWindow *w,
3911+ WindowEvent curWindowEvent,
3912+ float duration,
3913 const AnimEffect info,
3914- const CompRect &icon) :
3915+ const CompRect &icon) :
3916 Animation::Animation (w, curWindowEvent, duration, info, icon),
3917 GridAnim::GridAnim (w, curWindowEvent, duration, info, icon),
3918 mTopLeftCornerObject (0),
3919@@ -72,21 +72,18 @@
3920 mUseQTexCoord = true;
3921 }
3922
3923-MagicLampWavyAnim::MagicLampWavyAnim (CompWindow *w,
3924- WindowEvent curWindowEvent,
3925- float duration,
3926+MagicLampWavyAnim::MagicLampWavyAnim (CompWindow *w,
3927+ WindowEvent curWindowEvent,
3928+ float duration,
3929 const AnimEffect info,
3930- const CompRect &icon) :
3931+ const CompRect &icon) :
3932 Animation::Animation (w, curWindowEvent, duration, info, icon),
3933 MagicLampAnim::MagicLampAnim (w, curWindowEvent, duration, info, icon)
3934 {
3935- unsigned int maxWaves;
3936- float waveAmpMin, waveAmpMax;
3937- float distance;
3938-
3939- maxWaves = (unsigned) optValI (AnimationOptions::MagicLampWavyMaxWaves);
3940- waveAmpMin = optValF (AnimationOptions::MagicLampWavyAmpMin);
3941- waveAmpMax = optValF (AnimationOptions::MagicLampWavyAmpMax);
3942+ unsigned int maxWaves = (unsigned) optValI (AnimationOptions::MagicLampWavyMaxWaves);
3943+ float waveAmpMin = optValF (AnimationOptions::MagicLampWavyAmpMin);
3944+ float waveAmpMax = optValF (AnimationOptions::MagicLampWavyAmpMax);
3945+ float distance;
3946
3947 if (waveAmpMax < waveAmpMin)
3948 waveAmpMax = waveAmpMin;
3949@@ -96,19 +93,19 @@
3950 CompRect outRect (mAWindow->savedRectsValid () ?
3951 mAWindow->savedOutRect () :
3952 w->outputRect ());
3953+
3954 if (mTargetTop)
3955 distance = outRect.y () + outRect.height () - mIcon.y ();
3956 else
3957 distance = mIcon.y () - outRect.y ();
3958
3959- mNumWaves =
3960- 1 + (float)maxWaves *distance / ::screen->height ();
3961+ mNumWaves = 1 + (float)maxWaves * distance / ::screen->height ();
3962
3963 mWaves = new WaveParam[mNumWaves];
3964
3965 // Compute wave parameters
3966
3967- int ampDirection = (RAND_FLOAT () < 0.5 ? 1 : -1);
3968+ int ampDirection = (RAND_FLOAT () < 0.5 ? 1 : -1);
3969 float minHalfWidth = 0.22f;
3970 float maxHalfWidth = 0.38f;
3971
3972@@ -148,12 +145,11 @@
3973 /// the whole window (like in MagicLampAnim with menus).
3974 MagicLampAnim::~MagicLampAnim ()
3975 {
3976- if (mCurWindowEvent == WindowEventOpen ||
3977- mCurWindowEvent == WindowEventUnminimize ||
3978- mCurWindowEvent == WindowEventUnshade)
3979- {
3980+ if (mCurWindowEvent == WindowEventOpen ||
3981+ mCurWindowEvent == WindowEventUnminimize ||
3982+ mCurWindowEvent == WindowEventUnshade)
3983 mAWindow->expandBBWithWindow ();
3984- }
3985+
3986 }
3987
3988 bool
3989@@ -176,8 +172,10 @@
3990 {
3991 float cosx = ((x - mWaves[i].pos) /
3992 mWaves[i].halfWidth);
3993+
3994 if (cosx < -1 || cosx > 1)
3995 continue;
3996+
3997 targetX += (mWaves[i].amp * mModel->scale ().x () *
3998 (cos (cosx * M_PI) + 1) / 2);
3999 }
4000@@ -196,6 +194,7 @@
4001 mIcon.setX (x);
4002 mIcon.setY (y);
4003 }
4004+
4005 float forwardProgress = progressLinear ();
4006
4007 float iconCloseEndY;
4008@@ -232,6 +231,7 @@
4009 iconCloseEndY = mIcon.y () + mIcon.height ();
4010 winFarEndY = outRect.y () + winh;
4011 winVisibleCloseEndY = outRect.y ();
4012+
4013 if (winVisibleCloseEndY < iconCloseEndY)
4014 winVisibleCloseEndY = iconCloseEndY;
4015 }
4016@@ -266,30 +266,29 @@
4017 }
4018
4019 if (forwardProgress < preShapePhaseEnd)
4020- {
4021 stretchProgress = forwardProgress / stretchPhaseEnd;
4022- }
4023 else
4024 {
4025 if (forwardProgress < stretchPhaseEnd)
4026- {
4027 stretchProgress = forwardProgress / stretchPhaseEnd;
4028- }
4029 else
4030- {
4031 postStretchProgress =
4032 (forwardProgress - stretchPhaseEnd) / (1 - stretchPhaseEnd);
4033- }
4034 }
4035
4036 // The other objects are squeezed into a horizontal line behind the icon
4037- int topmostMovingObjectIdx = -1;
4038+ int topmostMovingObjectIdx = -1;
4039 int bottommostMovingObjectIdx = -1;
4040
4041- unsigned int n = mModel->numObjects ();
4042- float fx = 0.0f;
4043+ unsigned int n = mModel->numObjects ();
4044+ float fx = 0.0f;
4045 GridModel::GridObject *object = mModel->objects ();
4046- for (unsigned int i = 0; i < n; ++i, ++object)
4047+<<<<<<< TREE
4048+ for (unsigned int i = 0; i < n; ++i, ++object)
4049+=======
4050+
4051+ for (unsigned int i = 0; i < n; ++i, ++object)
4052+>>>>>>> MERGE-SOURCE
4053 {
4054 Point3d &objPos = object->position ();
4055 float objGridX = object->gridPosition ().x ();
4056@@ -304,6 +303,7 @@
4057 float iconY = (mIcon.y () + mIcon.height () * objGridY);
4058
4059 float stretchedPos;
4060+
4061 if (mTargetTop)
4062 stretchedPos = objGridY * origY + (1 - objGridY) * iconY;
4063 else
4064@@ -311,23 +311,17 @@
4065
4066 // Compute current y position
4067 if (forwardProgress < preShapePhaseEnd)
4068- {
4069 objPos.setY ((1 - stretchProgress) * origY +
4070 stretchProgress * stretchedPos);
4071- }
4072 else
4073 {
4074 if (forwardProgress < stretchPhaseEnd)
4075- {
4076 objPos.setY ((1 - stretchProgress) * origY +
4077 stretchProgress * stretchedPos);
4078- }
4079 else
4080- {
4081 objPos.setY ((1 - postStretchProgress) * stretchedPos +
4082 postStretchProgress *
4083 (stretchedPos + (iconCloseEndY - winFarEndY)));
4084- }
4085 }
4086
4087 if (mTargetTop)
4088@@ -378,7 +372,7 @@
4089 // Compute current x position
4090 if (forwardProgress < preShapePhaseEnd)
4091 objPos.setX ((1 - preShapeProgress) * origX +
4092- preShapeProgress * targetX);
4093+ preShapeProgress * targetX);
4094 else
4095 objPos.setX (targetX);
4096
4097@@ -388,8 +382,8 @@
4098
4099 if (stepRegionUsed ())
4100 {
4101- // Pick objects that will act as the corners of rectangles subtracted
4102- // from this step's damaged region
4103+ // Pick objects that will act as the corners of rectangles subtracted
4104+ // from this step's damaged region
4105
4106 const float topCornerRowRatio =
4107 (mTargetTop ? 0.55 : 0.35);// 0.46 0.42; // rectangle corner row ratio
4108@@ -398,6 +392,7 @@
4109
4110 if (topmostMovingObjectIdx < 0)
4111 topmostMovingObjectIdx = 0;
4112+
4113 if (bottommostMovingObjectIdx < 0)
4114 bottommostMovingObjectIdx = (int)n - 2;
4115
4116@@ -417,7 +412,12 @@
4117
4118 GridModel::GridObject *objects = mModel->objects ();
4119 unsigned int n = mModel->numObjects ();
4120- for (unsigned int i = 0; i < n; ++i)
4121+<<<<<<< TREE
4122+ for (unsigned int i = 0; i < n; ++i)
4123+=======
4124+
4125+ for (unsigned int i = 0; i < n; ++i)
4126+>>>>>>> MERGE-SOURCE
4127 {
4128 Point3d &objPos = objects[i].position ();
4129 mAWindow->expandBBWithPoint (objPos.x () + 0.5,
4130@@ -440,10 +440,10 @@
4131 if (objects[0].position ().x () >
4132 objects[n-2].position ().x ())
4133 {
4134- // Top-left corner is empty
4135+ // Top-left corner is empty
4136
4137- // Position of grid object to pick as the corner of the subtracted rect.
4138- Point3d &objPos = mTopLeftCornerObject->position ();
4139+ // Position of grid object to pick as the corner of the subtracted rect.
4140+ Point3d &objPos = mTopLeftCornerObject->position ();
4141 region -= CompRect (BB->x1,
4142 BB->y1,
4143 objPos.x () - BB->x1,
4144@@ -451,9 +451,9 @@
4145 }
4146 else // Bottom-left corner is empty
4147 {
4148- // Position of grid object to pick as the corner of the subtracted rect.
4149- Point3d &objPos = mBottomLeftCornerObject->position ();
4150- region -= CompRect (BB->x1,
4151+ // Position of grid object to pick as the corner of the subtracted rect.
4152+ Point3d &objPos = mBottomLeftCornerObject->position ();
4153+ region -= CompRect (BB->x1,
4154 objPos.y (),
4155 objPos.x () - BB->x1,
4156 BB->y2);
4157@@ -461,22 +461,22 @@
4158
4159 // Right side
4160 if (objects[1].position ().x () <
4161- objects[n-1].position ().x ())
4162+ objects[n-1].position ().x ())
4163 {
4164 // Top-right corner is empty
4165
4166- // Position of grid object to pick as the corner of the subtracted rect.
4167- Point3d &objPos = (mTopLeftCornerObject + 1)->position ();
4168- region -= CompRect (objPos.x (),
4169+ // Position of grid object to pick as the corner of the subtracted rect.
4170+ Point3d &objPos = (mTopLeftCornerObject + 1)->position ();
4171+ region -= CompRect (objPos.x (),
4172 BB->y1,
4173 BB->x2,
4174 objPos.y () - BB->y1);
4175 }
4176 else // Bottom-right corner is empty
4177 {
4178- // Position of grid object to pick as the corner of the subtracted rect.
4179- Point3d &objPos = (mBottomLeftCornerObject + 1)->position ();
4180- region -= CompRect (objPos.x (),
4181+ // Position of grid object to pick as the corner of the subtracted rect.
4182+ Point3d &objPos = (mBottomLeftCornerObject + 1)->position ();
4183+ region -= CompRect (objPos.x (),
4184 objPos.y (),
4185 BB->x2,
4186 BB->y2);
4187@@ -493,7 +493,7 @@
4188 MagicLampAnim::adjustPointerIconSize ()
4189 {
4190 mIcon.setWidth (MAX (4, optValI
4191- (AnimationOptions::MagicLampOpenStartWidth)));
4192+ (AnimationOptions::MagicLampOpenStartWidth)));
4193
4194 // Adjust position so that the icon is centered at the original position.
4195 mIcon.setX (mIcon.x () - mIcon.width () / 2);
4196@@ -503,9 +503,8 @@
4197 MagicLampWavyAnim::adjustPointerIconSize ()
4198 {
4199 mIcon.setWidth (MAX (4, optValI
4200- (AnimationOptions::MagicLampWavyOpenStartWidth)));
4201+ (AnimationOptions::MagicLampWavyOpenStartWidth)));
4202
4203 // Adjust position so that the icon is centered at the original position.
4204 mIcon.setX (mIcon.x () - mIcon.width () / 2);
4205 }
4206-
4207
4208=== modified file 'plugins/animation/src/options.cpp'
4209--- plugins/animation/src/options.cpp 2013-04-25 11:07:54 +0000
4210+++ plugins/animation/src/options.cpp 2013-07-21 23:03:28 +0000
4211@@ -81,7 +81,7 @@
4212
4213 bool
4214 IdValuePair::matchesPluginOption (ExtensionPluginInfo *testPluginInfo,
4215- int testOptionId) const
4216+ int testOptionId) const
4217 {
4218 return (pluginInfo == testPluginInfo &&
4219 optionId == testOptionId);
4220@@ -89,8 +89,8 @@
4221
4222 CompOption::Value &
4223 AnimWindow::pluginOptVal (ExtensionPluginInfo *pluginInfo,
4224- unsigned int optionId,
4225- Animation *anim)
4226+ unsigned int optionId,
4227+ Animation *anim)
4228 {
4229 PrivateAnimWindow *aw = priv;
4230 PrivateAnimScreen *as = aw->paScreen ();
4231@@ -114,24 +114,26 @@
4232
4233 OptionSet *
4234 PrivateAnimScreen::getOptionSetForSelectedRow (PrivateAnimWindow *aw,
4235- Animation *anim)
4236+ Animation *anim)
4237 {
4238- const AnimEvent event = win2AnimEventMap[anim->curWindowEvent ()];
4239- OptionSets &eventOptionSets = mEventOptionSets[event];
4240- OptionSet *setSelectedForRow = &eventOptionSets.sets[(unsigned int) aw->curAnimSelectionRow ()];
4241+ const AnimEvent event = win2AnimEventMap[anim->curWindowEvent ()];
4242+ OptionSets &eventOptionSets = mEventOptionSets[event];
4243+ OptionSet *setSelectedForRow = &eventOptionSets.sets[(unsigned int)
4244+ aw->curAnimSelectionRow ()];
4245
4246 return setSelectedForRow;
4247 }
4248
4249 void
4250-PrivateAnimScreen::updateOptionSet (OptionSet *os,
4251+PrivateAnimScreen::updateOptionSet (OptionSet *os,
4252 const char *optNamesValuesOrig)
4253 {
4254- unsigned int len = strlen (optNamesValuesOrig);
4255- char *optNamesValues = (char *)calloc (len + 1, 1);
4256+ unsigned int len = strlen (optNamesValuesOrig);
4257+ char *optNamesValues = (char *)calloc (len + 1, 1);
4258
4259 // Find the first substring with no spaces in it
4260 sscanf (optNamesValuesOrig, " %s ", optNamesValues);
4261+
4262 if (!strlen (optNamesValues))
4263 {
4264 free (optNamesValues);
4265@@ -140,15 +142,14 @@
4266 // Backup original, since strtok is destructive
4267 strcpy (optNamesValues, optNamesValuesOrig);
4268
4269- char *name;
4270- char *nameTrimmed = (char *)calloc (len + 1, 1);
4271- char *valueStr = 0;
4272- const char *betweenPairs = ",";
4273- const char *betweenOptVal = "=";
4274+ char *nameTrimmed = (char *)calloc (len + 1, 1);
4275+ char *valueStr = 0;
4276+ const char *betweenPairs = ",";
4277+ const char *betweenOptVal = "=";
4278
4279 // Count number of pairs
4280- char *pairToken = (char *)optNamesValuesOrig; // TODO do with CompString
4281- unsigned int nPairs = 1;
4282+ char *pairToken = (char *)optNamesValuesOrig; // TODO do with CompString
4283+ unsigned int nPairs = 1;
4284
4285 while ((pairToken = strchr (pairToken, betweenPairs[0])))
4286 {
4287@@ -160,13 +161,19 @@
4288 os->pairs.reserve (nPairs);
4289
4290 // Tokenize pairs
4291- name = strtok (optNamesValues, betweenOptVal);
4292+ char *name = strtok (optNamesValues, betweenOptVal);
4293
4294 int errorNo = -1;
4295 unsigned int i;
4296- for (i = 0; name && i < nPairs; ++i)
4297+<<<<<<< TREE
4298+ for (i = 0; name && i < nPairs; ++i)
4299+=======
4300+
4301+ for (i = 0; name && i < nPairs; ++i)
4302+>>>>>>> MERGE-SOURCE
4303 {
4304 errorNo = 0;
4305+
4306 if (strchr (name, betweenPairs[0])) // handle "a, b=4" case
4307 {
4308 errorNo = 1;
4309@@ -174,12 +181,15 @@
4310 }
4311
4312 sscanf (name, " %s ", nameTrimmed);
4313+
4314 if (!strlen (nameTrimmed))
4315 {
4316 errorNo = 2;
4317 break;
4318 }
4319+
4320 valueStr = strtok (0, betweenPairs);
4321+
4322 if (!valueStr)
4323 {
4324 errorNo = 3;
4325@@ -189,13 +199,16 @@
4326 // TODO: Fix: Convert to "pluginname:option_name" format
4327 // Warning: Assumes that option names in different extension plugins
4328 // will be different.
4329- bool matched = false;
4330- const ExtensionPluginInfo *chosenExtensionPlugin = NULL;
4331- CompOption *o = 0;
4332- int optId = -1;
4333+ bool matched = false;
4334+ const ExtensionPluginInfo *chosenExtensionPlugin = NULL;
4335+ CompOption *o = 0;
4336+ int optId = -1;
4337+ unsigned int nOptions;
4338+
4339 foreach (ExtensionPluginInfo *extensionPlugin, mExtensionPlugins)
4340 {
4341- unsigned int nOptions = extensionPlugin->effectOptions->size ();
4342+ nOptions = extensionPlugin->effectOptions->size ();
4343+
4344 for (optId = (int)extensionPlugin->firstEffectOptionIndex;
4345 optId < (int)nOptions; ++optId)
4346 {
4347@@ -208,14 +221,17 @@
4348 break;
4349 }
4350 }
4351+
4352 if (matched)
4353 break;
4354 }
4355+
4356 if (!matched)
4357 {
4358 errorNo = 4;
4359 break;
4360 }
4361+
4362 CompOption::Value v;
4363
4364 os->pairs.push_back (IdValuePair ());
4365@@ -224,8 +240,10 @@
4366 pair->pluginInfo = chosenExtensionPlugin;
4367 pair->optionId = optId;
4368 int valueRead = -1;
4369+
4370 switch (o->type ())
4371 {
4372+<<<<<<< TREE
4373 case CompOption::TypeBool:
4374 int vb;
4375 valueRead = sscanf (valueStr, " %d ", &vb);
4376@@ -289,8 +307,86 @@
4377 default:
4378 break;
4379 }
4380+=======
4381+ case CompOption::TypeBool:
4382+ int vb;
4383+ valueRead = sscanf (valueStr, " %d ", &vb);
4384+
4385+ if (valueRead)
4386+ pair->value.set ((bool)vb);
4387+
4388+ break;
4389+
4390+ case CompOption::TypeInt:
4391+ {
4392+ int vi;
4393+ valueRead = sscanf (valueStr, " %d ", &vi);
4394+
4395+ if (valueRead > 0)
4396+ {
4397+ if (o->rest ().inRange (vi))
4398+ {
4399+ v.set (vi);
4400+ pair->value = v;
4401+ }
4402+ else
4403+ errorNo = 7;
4404+ }
4405+
4406+ break;
4407+ }
4408+ case CompOption::TypeFloat:
4409+ {
4410+ float vf;
4411+ valueRead = sscanf (valueStr, " %f ", &vf);
4412+
4413+ if (valueRead > 0)
4414+ {
4415+ if (o->rest ().inRange (vf))
4416+ {
4417+ v.set (vf);
4418+ pair->value = v;
4419+ }
4420+ else
4421+ errorNo = 7;
4422+ }
4423+
4424+ break;
4425+ }
4426+ case CompOption::TypeString:
4427+ {
4428+ v.set (CompString (valueStr));
4429+ valueRead = 1;
4430+ break;
4431+ }
4432+
4433+ case CompOption::TypeColor:
4434+ {
4435+ unsigned short vc[4];
4436+ valueRead = sscanf (valueStr, " #%2hx%2hx%2hx%2hx ",
4437+ &vc[0], &vc[1], &vc[2], &vc[3]);
4438+
4439+ if (valueRead == 4)
4440+ {
4441+ CompOption::Value *pairVal = &pair->value;
4442+ for (int j = 0; j < 4; ++j)
4443+ vc[j] = vc[j] << 8 | vc[j];
4444+ pairVal->set (vc);
4445+ }
4446+ else
4447+ errorNo = 6;
4448+
4449+ break;
4450+ }
4451+
4452+ default:
4453+ break;
4454+ }
4455+
4456+>>>>>>> MERGE-SOURCE
4457 if (valueRead == 0)
4458 errorNo = 6;
4459+
4460 if (errorNo > 0)
4461 break;
4462 // If valueRead is -1 here, then it must be a
4463@@ -305,38 +401,44 @@
4464 {
4465 switch (errorNo)
4466 {
4467- case -1:
4468- case 2:
4469- compLogMessage ("animation", CompLogLevelError,
4470- "Option name missing in \"%s\"",
4471- optNamesValuesOrig);
4472- break;
4473- case 1:
4474- case 3:
4475- compLogMessage ("animation", CompLogLevelError,
4476- "Option value missing in \"%s\"",
4477- optNamesValuesOrig);
4478- break;
4479- case 4:
4480- //compLogMessage ("animation", CompLogLevelError,
4481- // "Unknown option \"%s\" in \"%s\"",
4482- // nameTrimmed, optNamesValuesOrig);
4483- break;
4484- case 6:
4485- compLogMessage ("animation", CompLogLevelError,
4486- "Invalid value \"%s\" in \"%s\"",
4487- valueStr, optNamesValuesOrig);
4488- break;
4489- case 7:
4490- compLogMessage ("animation", CompLogLevelError,
4491- "Value \"%s\" out of range in \"%s\"",
4492- valueStr, optNamesValuesOrig);
4493- break;
4494- default:
4495- break;
4496+ case -1:
4497+ case 2:
4498+ compLogMessage ("animation", CompLogLevelError,
4499+ "Option name missing in \"%s\"",
4500+ optNamesValuesOrig);
4501+ break;
4502+
4503+ case 1:
4504+ case 3:
4505+ compLogMessage ("animation", CompLogLevelError,
4506+ "Option value missing in \"%s\"",
4507+ optNamesValuesOrig);
4508+ break;
4509+
4510+ case 4:
4511+ //compLogMessage ("animation", CompLogLevelError,
4512+ // "Unknown option \"%s\" in \"%s\"",
4513+ // nameTrimmed, optNamesValuesOrig);
4514+ break;
4515+
4516+ case 6:
4517+ compLogMessage ("animation", CompLogLevelError,
4518+ "Invalid value \"%s\" in \"%s\"",
4519+ valueStr, optNamesValuesOrig);
4520+ break;
4521+
4522+ case 7:
4523+ compLogMessage ("animation", CompLogLevelError,
4524+ "Value \"%s\" out of range in \"%s\"",
4525+ valueStr, optNamesValuesOrig);
4526+ break;
4527+
4528+ default:
4529+ break;
4530 }
4531 os->pairs.clear ();
4532 }
4533+
4534 free (optNamesValues);
4535 free (nameTrimmed);
4536 }
4537@@ -358,4 +460,3 @@
4538 updateOptionSet (&oss->sets[i], (*listVal)[i].s ().c_str ());
4539 }
4540 }
4541-
4542
4543=== modified file 'plugins/animation/src/private.h'
4544--- plugins/animation/src/private.h 2012-09-07 22:37:20 +0000
4545+++ plugins/animation/src/private.h 2013-07-21 23:03:28 +0000
4546@@ -21,27 +21,33 @@
4547 class RestackInfo
4548 {
4549 public:
4550+
4551 RestackInfo (CompWindow *wRestacked,
4552 CompWindow *wStart,
4553 CompWindow *wEnd,
4554 CompWindow *wOldAbove,
4555- bool raised);
4556-
4557- CompWindow *wRestacked, *wStart, *wEnd, *wOldAbove;
4558- bool raised;
4559+ bool raised);
4560+
4561+ CompWindow *wRestacked;
4562+ CompWindow *wStart;
4563+ CompWindow *wEnd;
4564+ CompWindow *wOldAbove;
4565+
4566+ bool raised;
4567 };
4568
4569 class IdValuePair
4570 {
4571 public:
4572+
4573 IdValuePair () : pluginInfo (0), optionId (-1), value () {}
4574
4575 bool matchesPluginOption (ExtensionPluginInfo *pluginInfo,
4576- int optionId) const;
4577+ int optionId) const;
4578
4579 const ExtensionPluginInfo *pluginInfo;
4580- int optionId;
4581- CompOption::Value value;
4582+ int optionId;
4583+ CompOption::Value value;
4584 };
4585
4586 typedef std::vector<IdValuePair> IdValuePairVector;
4587@@ -49,6 +55,7 @@
4588 class OptionSet
4589 {
4590 public:
4591+
4592 OptionSet () {}
4593
4594 IdValuePairVector pairs;
4595@@ -59,6 +66,7 @@
4596 class OptionSets
4597 {
4598 public:
4599+
4600 OptionSets () {}
4601
4602 OptionSetVector sets;
4603@@ -67,6 +75,7 @@
4604 class EffectSet
4605 {
4606 public:
4607+
4608 EffectSet () {}
4609
4610 AnimEffectVector effects;
4611@@ -120,15 +129,15 @@
4612 // in PrivateAnimScreenOptions
4613 #define NUM_NONEFFECT_OPTIONS AnimationOptions::CurvedFoldAmpMult
4614
4615-
4616 class ExtensionPluginAnimation : public ExtensionPluginInfo
4617 {
4618 public:
4619- ExtensionPluginAnimation (const CompString &name,
4620- unsigned int nEffects,
4621- AnimEffect *effects,
4622+
4623+ ExtensionPluginAnimation (const CompString &name,
4624+ unsigned int nEffects,
4625+ AnimEffect *effects,
4626 CompOption::Vector *effectOptions,
4627- unsigned int firstEffectOptionIndex);
4628+ unsigned int firstEffectOptionIndex);
4629 ~ExtensionPluginAnimation ();
4630
4631 // Overriden methods from ExtensionPluginInfo
4632@@ -144,7 +153,7 @@
4633 void initPersistentData (AnimWindow *aw);
4634 void destroyPersistentData (AnimWindow *aw);
4635 void postUpdateEventEffects (AnimEvent e,
4636- bool forRandom);
4637+ bool forRandom);
4638 void cleanUpAnimation (bool closing,
4639 bool destructing);
4640 void postStartupCountdown ();
4641@@ -163,7 +172,8 @@
4642 CompWindow * walkNext (CompWindow *w);
4643 void incrementCurRestackAnimCount ();
4644 void decrementCurRestackAnimCount ();
4645- bool wontCreateCircularChain (CompWindow *wCur, CompWindow *wNext);
4646+ bool wontCreateCircularChain (CompWindow *wCur,
4647+ CompWindow *wNext);
4648
4649 static void cleanUpParentChildChainItem (AnimWindow *aw);
4650 static bool relevantForRestackAnim (CompWindow *w);
4651@@ -177,13 +187,13 @@
4652 bool mAWinWasRestackedJustNow;
4653
4654 private:
4655- CompWindowVector mLastClientList; ///< Last known stacking order
4656- CompWindowVector mPrevClientList; ///< The stacking order before mLastClientList
4657- int mRestackAnimCount; ///< Count of how many windows are currently involved in
4658- ///< animations that require walker (dodge & focus fade).
4659+ CompWindowVector mLastClientList; ///< Last known stacking order
4660+ CompWindowVector mPrevClientList; ///< The stacking order before mLastClientList
4661+ int mRestackAnimCount; ///< Count of how many windows are currently involved in
4662+ ///< animations that require walker (dodge & focus fade).
4663 std::vector<AnimWindow *> mRestackedWindows;
4664
4665- CompWindowList mWindowList;
4666+ CompWindowList mWindowList;
4667 };
4668
4669 class PrivateAnimScreen :
4670@@ -196,48 +206,50 @@
4671 friend class AnimWindow;
4672
4673 public:
4674- CompositeScreen *cScreen;
4675- GLScreen *gScreen;
4676- AnimScreen *aScreen;
4677+
4678+ CompositeScreen *cScreen;
4679+ GLScreen *gScreen;
4680+ AnimScreen *aScreen;
4681
4682 private:
4683- struct timeval mLastRedrawTime;
4684- bool mLastRedrawTimeFresh;
4685-
4686- bool mPluginActive[WatchedScreenPluginNum];
4687- int mSwitcherPostWait;
4688- int mStartCountdown;
4689+
4690+ struct timeval mLastRedrawTime;
4691+ bool mLastRedrawTimeFresh;
4692+
4693+ bool mPluginActive[WatchedScreenPluginNum];
4694+ int mSwitcherPostWait;
4695+ int mStartCountdown;
4696 ///< To mark windows as "created" if they were opened before compiz
4697 ///< was started and to prevent already opened windows from doing
4698 ///< open animation.
4699
4700- Window mLastActiveWindow; ///< Last known active window
4701-
4702- bool mAnimInProgress; ///< Is an animation currently being played?
4703- bool mStartingNewPaintRound; ///< Is a new round of glPaints starting?
4704- bool mPrePaintWindowsBackToFrontEnabled;
4705-
4706- EffectSet mRandomEffects[AnimEventNum];
4707-
4708- OptionSets mEventOptionSets[AnimEventNum];
4709+ Window mLastActiveWindow; ///< Last known active window
4710+
4711+ bool mAnimInProgress; ///< Is an animation currently being played?
4712+ bool mStartingNewPaintRound; ///< Is a new round of glPaints starting?
4713+ bool mPrePaintWindowsBackToFrontEnabled;
4714+
4715+ EffectSet mRandomEffects[AnimEventNum];
4716+
4717+ OptionSets mEventOptionSets[AnimEventNum];
4718
4719 // Effect extension plugins
4720 ExtensionPluginVector mExtensionPlugins;
4721
4722 // Possible effects for each event
4723- AnimEffectVector mEventEffectsAllowed[AnimEventNum];
4724+ AnimEffectVector mEventEffectsAllowed[AnimEventNum];
4725
4726 // List of chosen effects for each event
4727- EffectSet mEventEffects[AnimEventNum];
4728-
4729- CompOutput *mOutput;
4730-
4731- Window mActiveWindow;
4732- CompMatch mNeverAnimateMatch;
4733-
4734- const CompWindowList *mLockedPaintList;
4735- unsigned int mLockedPaintListCnt;
4736- unsigned int mGetWindowPaintListEnableCnt;
4737+ EffectSet mEventEffects[AnimEventNum];
4738+
4739+ CompOutput *mOutput;
4740+
4741+ Window mActiveWindow;
4742+ CompMatch mNeverAnimateMatch;
4743+
4744+ const CompWindowList *mLockedPaintList;
4745+ unsigned int mLockedPaintListCnt;
4746+ unsigned int mGetWindowPaintListEnableCnt;
4747
4748 void updateEventEffects (AnimEvent e,
4749 bool forRandom,
4750@@ -245,25 +257,32 @@
4751 void updateAllEventEffects ();
4752
4753 void updateOptionSets (AnimEvent e);
4754- void updateOptionSet (OptionSet *os, const char *optNamesValuesOrig);
4755+ void updateOptionSet (OptionSet *os,
4756+ const char *optNamesValuesOrig);
4757
4758 void activateEvent (bool activating);
4759 bool isWinVisible (CompWindow *w);
4760 AnimEvent getCorrespondingAnimEvent (AnimationOptions::Options optionId);
4761- void eventMatchesChanged (CompOption *opt, AnimationOptions::Options num);
4762- void eventOptionsChanged (CompOption *opt, AnimationOptions::Options num);
4763- void eventEffectsChanged (CompOption *opt, AnimationOptions::Options num);
4764- void eventRandomEffectsChanged (CompOption *opt, AnimationOptions::Options num);
4765+ void eventMatchesChanged (CompOption *opt,
4766+ AnimationOptions::Options num);
4767+ void eventOptionsChanged (CompOption *opt,
4768+ AnimationOptions::Options num);
4769+ void eventEffectsChanged (CompOption *opt,
4770+ AnimationOptions::Options num);
4771+ void eventRandomEffectsChanged (CompOption *opt,
4772+ AnimationOptions::Options num);
4773
4774- CompRect getIcon (CompWindow *w, bool alwaysUseMouse);
4775+ CompRect getIcon (CompWindow *w,
4776+ bool alwaysUseMouse);
4777 void updateAnimStillInProgress ();
4778
4779 bool isAnimEffectInList (AnimEffect theEffect,
4780- EffectSet &effectList);
4781+ EffectSet &effectList);
4782 bool isAnimEffectPossibleForEvent (AnimEffect theEffect,
4783- AnimEvent event);
4784+ AnimEvent event);
4785
4786 public:
4787+
4788 PrivateAnimScreen (CompScreen *s, AnimScreen *);
4789 ~PrivateAnimScreen ();
4790
4791@@ -293,16 +312,17 @@
4792 bool isAnimEffectPossible (AnimEffect theEffect);
4793 inline CompOutput &output () { return *mOutput; }
4794 AnimEffect getActualEffect (AnimEffect effect,
4795- AnimEvent animEvent);
4796- bool shouldIgnoreWindowForAnim (CompWindow *w, bool checkPixmap);
4797+ AnimEvent animEvent);
4798+ bool shouldIgnoreWindowForAnim (CompWindow *w,
4799+ bool checkPixmap);
4800 OptionSet *getOptionSetForSelectedRow (PrivateAnimWindow *aw,
4801- Animation *anim);
4802+ Animation *anim);
4803 void addExtension (ExtensionPluginInfo *extensionPluginInfo,
4804- bool shouldInitPersistentData);
4805+ bool shouldInitPersistentData);
4806 void removeExtension (ExtensionPluginInfo *extensionPluginInfo);
4807 AnimEffect getMatchingAnimSelection (CompWindow *w,
4808- AnimEvent e,
4809- int *duration);
4810+ AnimEvent e,
4811+ int *duration);
4812 bool otherPluginsActive ();
4813
4814 void enablePrePaintWindowsBackToFront (bool enabled);
4815@@ -315,13 +335,14 @@
4816
4817 // GLScreenInterface methods
4818 bool glPaintOutput (const GLScreenPaintAttrib &,
4819- const GLMatrix &,
4820- const CompRegion &,
4821- CompOutput *,
4822- unsigned int);
4823+ const GLMatrix &,
4824+ const CompRegion &,
4825+ CompOutput *,
4826+ unsigned int );
4827
4828 // ScreenInterface methods
4829- void handleCompizEvent (const char * plugin, const char *event,
4830+ void handleCompizEvent (const char *plugin,
4831+ const char *event,
4832 CompOption::Vector &options);
4833 };
4834
4835@@ -333,6 +354,7 @@
4836 friend class AnimWindow;
4837
4838 public:
4839+
4840 PrivateAnimWindow (CompWindow *, AnimWindow *aw);
4841 ~PrivateAnimWindow ();
4842
4843@@ -351,41 +373,43 @@
4844 GLWindow *gWindow;
4845
4846 private:
4847+
4848 CompWindow *mWindow;
4849 AnimWindow *mAWindow;
4850
4851 PrivateAnimScreen *mPAScreen;
4852
4853- unsigned int mState;
4854- unsigned int mNewState;
4855-
4856- Animation *mCurAnimation;
4857-
4858- bool mUnshadePending;
4859- bool mEventNotOpenClose;
4860- bool mNowShaded;
4861- bool mGrabbed;
4862-
4863- int mUnmapCnt;
4864- int mDestroyCnt;
4865-
4866- bool mIgnoreDamage;
4867- bool mFinishingAnim;
4868-
4869- int mCurAnimSelectionRow;
4870- int mPrevAnimSelectionRow; ///< For the case when one event interrupts another
4871-
4872- Box mBB; ///< Bounding box of area to be damaged
4873-
4874- CompRegion mStepRegion; ///< Region to damage this step
4875- CompRegion mLastStepRegion; ///< Region damaged last step
4876-
4877- bool mPluginActive[WatchedWindowPluginNum];
4878+ unsigned int mState;
4879+ unsigned int mNewState;
4880+
4881+ Animation *mCurAnimation;
4882+
4883+ bool mUnshadePending;
4884+ bool mEventNotOpenClose;
4885+ bool mNowShaded;
4886+ bool mGrabbed;
4887+
4888+ int mUnmapCnt;
4889+ int mDestroyCnt;
4890+
4891+ bool mIgnoreDamage;
4892+ bool mFinishingAnim;
4893+
4894+ int mCurAnimSelectionRow;
4895+ int mPrevAnimSelectionRow; ///< For the case when one event interrupts another
4896+
4897+ Box mBB; ///< Bounding box of area to be damaged
4898+
4899+ CompRegion mStepRegion; ///< Region to damage this step
4900+ CompRegion mLastStepRegion; ///< Region damaged last step
4901+
4902+ bool mPluginActive[WatchedWindowPluginNum];
4903
4904 // Utility methods
4905 unsigned int getState ();
4906 void updateSelectionRow (unsigned int i);
4907- void postAnimationCleanUpPrev (bool closing, bool clearMatchingRow);
4908+ void postAnimationCleanUpPrev (bool closing,
4909+ bool clearMatchingRow);
4910 void postAnimationCleanUpCustom (bool closing,
4911 bool destructing,
4912 bool clearMatchingRow);
4913@@ -395,20 +419,34 @@
4914 void notifyAnimation (bool activation);
4915
4916 // WindowInterface methods
4917- void resizeNotify (int dx, int dy, int dwidth, int dheight);
4918- void moveNotify (int dx, int dy, bool immediate);
4919+ void resizeNotify (int dx,
4920+ int dy,
4921+ int dwidth,
4922+ int dheight);
4923+ void moveNotify (int dx,
4924+ int dy,
4925+ bool immediate);
4926 void windowNotify (CompWindowNotify n);
4927- void grabNotify (int x, int y, unsigned int state, unsigned int mask);
4928+ void grabNotify (int x,
4929+ int y,
4930+ unsigned int state,
4931+ unsigned int mask);
4932 void ungrabNotify ();
4933
4934 // GLWindowInterface methods
4935- bool glPaint (const GLWindowPaintAttrib &, const GLMatrix &,
4936- const CompRegion &, unsigned int);
4937+ bool glPaint (const GLWindowPaintAttrib &,
4938+ const GLMatrix &,
4939+ const CompRegion &,
4940+ unsigned int );
4941 void glAddGeometry (const GLTexture::MatrixList &,
4942- const CompRegion &, const CompRegion &,
4943- unsigned int = MAXSHORT, unsigned int = MAXSHORT);
4944- void glDrawTexture (GLTexture *texture, const GLMatrix &,
4945- const GLWindowPaintAttrib &, unsigned int);
4946+ const CompRegion &,
4947+ const CompRegion &,
4948+ unsigned int = MAXSHORT,
4949+ unsigned int = MAXSHORT);
4950+ void glDrawTexture (GLTexture *texture,
4951+ const GLMatrix &,
4952+ const GLWindowPaintAttrib &,
4953+ unsigned int );
4954 //void glDrawGeometry ();
4955 };
4956
4957@@ -416,12 +454,14 @@
4958 public GridAnim
4959 {
4960 public:
4961- RollUpAnim (CompWindow *w,
4962- WindowEvent curWindowEvent,
4963- float duration,
4964+
4965+ RollUpAnim (CompWindow *w,
4966+ WindowEvent curWindowEvent,
4967+ float duration,
4968 const AnimEffect info,
4969- const CompRect &icon);
4970+ const CompRect &icon);
4971 protected:
4972+
4973 static const float kDurationFactor;
4974
4975 void initGrid ();
4976@@ -432,15 +472,17 @@
4977 public GridAnim
4978 {
4979 public:
4980- MagicLampAnim (CompWindow *w,
4981- WindowEvent curWindowEvent,
4982- float duration,
4983- const AnimEffect info,
4984- const CompRect &icon);
4985+
4986+ MagicLampAnim (CompWindow *w,
4987+ WindowEvent curWindowEvent,
4988+ float duration,
4989+ const AnimEffect info,
4990+ const CompRect &icon);
4991 virtual ~MagicLampAnim ();
4992
4993 protected:
4994- bool mTargetTop;
4995+
4996+ bool mTargetTop;
4997 GridModel::GridObject *mTopLeftCornerObject;
4998 GridModel::GridObject *mBottomLeftCornerObject;
4999
5000@@ -451,30 +493,33 @@
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: