Effects major version 0 is unstable, so require exact match.

svn path=/trunk/KDE/kdebase/workspace/; revision=755989
This commit is contained in:
Luboš Luňák 2008-01-02 15:18:34 +00:00
parent 76c76f585d
commit 580439ecbc

View file

@ -733,8 +733,10 @@ bool EffectsHandlerImpl::loadEffect( const QString& name )
typedef int (*t_versionfunc)();
int version = reinterpret_cast< t_versionfunc >( version_func )(); // call it
// Version must be the same or less, but major must be the same.
// With major 0 minor must match exactly.
if( version > KWIN_EFFECT_API_VERSION
|| ( version >> 8 ) != KWIN_EFFECT_API_VERSION_MAJOR )
|| ( version >> 8 ) != KWIN_EFFECT_API_VERSION_MAJOR
|| ( KWIN_EFFECT_API_VERSION_MAJOR == 0 && version != KWIN_EFFECT_API_VERSION ))
{
kWarning( 1212 ) << "Effect " << name << " requires unsupported API version " << version;
return false;