Bug 310646

Summary: No animations in the CoverSwitch effect
Product: [Plasma] kwin Reporter: Guillaume DE BURE <guillaume.debure>
Component: effects-tabboxAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal Flags: mgraesslin: ReviewRequest+
Priority: NOR    
Version: 4.9.80   
Target Milestone: 4.10 Beta 2   
Platform: Arch Linux   
OS: Linux   
URL: https://git.reviewboard.kde.org/r/107460/
Latest Commit: Version Fixed In: 4.10
Attachments: kcmshell4 kwincompositing 1
kcmshell4 kwincompositing 2
kcmshell4 kwincompositing 3
Patch for issue

Description Guillaume DE BURE 2012-11-25 14:19:19 UTC
In 4.9.80, there is no animation in the "Circular Swicth" effect : in previous versions, windows glided smoothly between their positions. No windows just jump between  position. It's a bit difficult to explain, so if the report is not understandable, I can make a screencast.

Thanks !

Reproducible: Always
Comment 1 Thomas Lübking 2012-11-25 14:27:52 UTC
Altering component on the vague guess that "circular switch" is coverswitch?
Window-tabbing was wrong for sure though.

@Guillaume
Can you provide the untranslated (not re-translated ;-) name of the item or make a snapshot?
In case of cover or flip switch, what about the resp. settings in "kcmshell4 kwincompositing"?
Comment 2 Guillaume DE BURE 2012-11-25 16:08:08 UTC
Created attachment 75468 [details]
kcmshell4 kwincompositing 1
Comment 3 Guillaume DE BURE 2012-11-25 16:08:53 UTC
Created attachment 75469 [details]
kcmshell4 kwincompositing 2
Comment 4 Guillaume DE BURE 2012-11-25 16:09:27 UTC
Created attachment 75470 [details]
kcmshell4 kwincompositing 3
Comment 5 Guillaume DE BURE 2012-11-25 16:10:01 UTC
Indeed, coverswitch, sorry for the wrong translation :)
Comment 6 Martin Flöser 2012-11-25 16:14:41 UTC
Bug is obvious - patch in a minute
Comment 7 Martin Flöser 2012-11-25 16:18:20 UTC
Created attachment 75471 [details]
Patch for issue

animation duration was set to always 0
Comment 8 Thomas Lübking 2012-11-25 16:37:31 UTC
"ship it!" 
(while reimplemting CoverSwitchConfig::duration() would of course be much nicer - price for xml settings ;-)
Comment 9 Martin Flöser 2012-11-25 17:21:37 UTC
(In reply to comment #8)
> (while reimplemting CoverSwitchConfig::duration() would of course be much
> nicer - price for xml settings ;-)
I have an idea for that problem - going to put something on review board
Comment 10 Martin Flöser 2012-11-25 17:52:35 UTC
https://git.reviewboard.kde.org/r/107460/
Comment 11 Martin Flöser 2012-11-25 19:19:31 UTC
Git commit 246822013ccc810b90ccfb925f73de9d3479a4bc by Martin Gräßlin.
Committed on 25/11/2012 at 18:46.
Pushed by graesslin into branch 'master'.

Introduce a templated animationTime overload for the KConfigXT case

This method can be used to get the animationTime in case a configuration
class generated through KConfigXT is used. In general the configuration
stores the magic value 0 for a property "duration". This magic value
indicates that a hard-coded default value should be used.

So the common logic to test the stored value for 0 and then either pass
the stored value or the default value to animationTime is encapsulated
in this method in a generic way.

A MyEffect can use it in the following way:
animationTime<MyEffectConfig>(200);
FIXED-IN: 4.10
REVIEW: 107460

M  +1    -1    kwin/effects/coverswitch/coverswitch.cpp
M  +1    -0    kwin/effects/cube/cube.cpp
M  +1    -0    kwin/effects/cube/cubeslide.cpp
M  +1    -2    kwin/effects/dashboard/dashboard.cpp
M  +0    -1    kwin/effects/dashboard/dashboard.h
M  +1    -0    kwin/effects/desktopgrid/desktopgrid.cpp
M  +1    -1    kwin/effects/flipswitch/flipswitch.cpp
M  +1    -1    kwin/effects/glide/glide.cpp
M  +1    -0    kwin/effects/magiclamp/magiclamp.cpp
M  +15   -0    kwin/libkwineffects/kwineffects.h

http://commits.kde.org/kde-workspace/246822013ccc810b90ccfb925f73de9d3479a4bc
Comment 12 Guillaume DE BURE 2012-11-25 21:02:32 UTC
Wow, that was fast thanks :)