Merge lp:~sjakthol/compiz/fix-1098185 into lp:compiz/0.9.9

Proposed by Sami Jaktholm
Status: Merged
Approved by: Brandon Schaefer
Approved revision: 3555
Merged at revision: 3561
Proposed branch: lp:~sjakthol/compiz/fix-1098185
Merge into: lp:compiz/0.9.9
Diff against target: 11 lines (+1/-1)
1 file modified
plugins/animation/src/animation.cpp (+1/-1)
To merge this branch: bzr merge lp:~sjakthol/compiz/fix-1098185
Reviewer Review Type Date Requested Status
Brandon Schaefer (community) Approve
Sam Spilsbury Approve
PS Jenkins bot continuous-integration Pending
Review via email: mp+142848@code.launchpad.net

Commit message

Animation: Correctly specify the events an effect can be used with.

If AnimEffectUsedFor::none() is called, the effect will be marked to
be used with ALL events instead of NONE. This causes crashes if the
chosen random effect is not compatible with the triggering event.

For example dodge effect as random minimize animation causes segfault
as it's only supposed to be a focus in/out animation.

Description of the change

Test case:
1. In CCSM -> Animations -> Minimize animation choose Random and make sure none of the effects in Random events pool is not selected.
2. Minimize a window, restore it and repeat

Without the fix:
- Compiz segfaults when incompatible animation is chosen

With the fix:
- No segfaults as incompatible animations are not chosen

To post a comment you must log in.
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Great catch, thanks.

Revision history for this message
Sam Spilsbury (smspillaz) :
review: Approve
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Cool, confirmed this fixes the crash.

review: Approve
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

In future, please deduplicate the bugs and only track one bug per bug.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/animation/src/animation.cpp'
2--- plugins/animation/src/animation.cpp 2012-10-12 09:05:18 +0000
3+++ plugins/animation/src/animation.cpp 2013-01-11 08:37:22 +0000
4@@ -2523,7 +2523,7 @@
5 {
6 AnimEffectUsedFor usedFor;
7 usedFor.open = usedFor.close = usedFor.minimize =
8- usedFor.shade = usedFor.unminimize = usedFor.focus = true;
9+ usedFor.shade = usedFor.unminimize = usedFor.focus = false;
10 return usedFor;
11 }
12

Subscribers

People subscribed via source and target branches