Commit 3c2ca184 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

effects: Remove Desktop Cube Animation effect

With the ongoing scene redesign, it needs to be rewritten. However,
given that it is not used widely based on support information from
various bug reports and our available man power is sparse, the most
reasonable thing is to drop the effect, unfortunately.
parent 47ef0b5a
......@@ -92,7 +92,6 @@ void DesktopSwitchingAnimationTest::testSwitchDesktops_data()
{
QTest::addColumn<QString>("effectName");
QTest::newRow("Desktop Cube Animation") << QStringLiteral("cubeslide");
QTest::newRow("Fade Desktop") << QStringLiteral("kwin4_effect_fadedesktop");
QTest::newRow("Slide") << QStringLiteral("slide");
}
......
......@@ -73,7 +73,6 @@ void TestBuiltInEffectLoader::testHasEffect_data()
QTest::newRow("case sensitive") << QStringLiteral("BlUR") << true;
QTest::newRow("Colorpicker") << QStringLiteral("colorpicker") << true;
QTest::newRow("Contrast") << QStringLiteral("contrast") << true;
QTest::newRow("CubeSlide") << QStringLiteral("cubeslide") << true;
QTest::newRow("DesktopGrid") << QStringLiteral("desktopgrid") << true;
QTest::newRow("DimInactive") << QStringLiteral("diminactive") << true;
QTest::newRow("FallApart") << QStringLiteral("fallapart") << true;
......@@ -124,7 +123,6 @@ void TestBuiltInEffectLoader::testKnownEffects()
expectedEffects << QStringLiteral("blur")
<< QStringLiteral("colorpicker")
<< QStringLiteral("contrast")
<< QStringLiteral("cubeslide")
<< QStringLiteral("desktopgrid")
<< QStringLiteral("diminactive")
<< QStringLiteral("fallapart")
......@@ -183,9 +181,6 @@ void TestBuiltInEffectLoader::testSupported_data()
QTest::newRow("Contrast") << QStringLiteral("contrast") << false << xc << true;
// fails for GL as it does proper tests on what's supported and doesn't just check whether it's GL
QTest::newRow("Contrast-GL") << QStringLiteral("contrast") << false << oc << true;
QTest::newRow("CubeSlide") << QStringLiteral("cubeslide") << false << xc << true;
QTest::newRow("CubeSlide-GL") << QStringLiteral("cubeslide") << true << oc << true;
QTest::newRow("CubeSlide-GL-no-anim") << QStringLiteral("cubeslide") << false << oc << false;
QTest::newRow("DesktopGrid") << QStringLiteral("desktopgrid") << true << xc << true;
QTest::newRow("DimInactive") << QStringLiteral("diminactive") << true << xc << true;
QTest::newRow("FallApart") << QStringLiteral("fallapart") << false << xc << true;
......@@ -264,8 +259,6 @@ void TestBuiltInEffectLoader::testLoadEffect_data()
QTest::newRow("Contrast") << QStringLiteral("contrast") << false << xc;
// fails for GL as it does proper tests on what's supported and doesn't just check whether it's GL
QTest::newRow("Contrast-GL") << QStringLiteral("contrast") << false << oc;
QTest::newRow("CubeSlide") << QStringLiteral("cubeslide") << false << xc;
QTest::newRow("CubeSlide-GL") << QStringLiteral("cubeslide") << true << oc;
QTest::newRow("DesktopGrid") << QStringLiteral("desktopgrid") << true << xc;
QTest::newRow("DimInactive") << QStringLiteral("diminactive") << true << xc;
QTest::newRow("FallApart") << QStringLiteral("fallapart") << false << xc;
......
......@@ -64,7 +64,6 @@ void TestPluginEffectLoader::testHasEffect_data()
QTest::newRow("blur") << QStringLiteral("blur") << false;
QTest::newRow("ColorPicker") << QStringLiteral("colorpicker") << false;
QTest::newRow("Contrast") << QStringLiteral("contrast") << false;
QTest::newRow("CubeSlide") << QStringLiteral("cubeslide") << false;
QTest::newRow("DesktopGrid") << QStringLiteral("desktopgrid") << false;
QTest::newRow("DimInactive") << QStringLiteral("diminactive") << false;
QTest::newRow("FallApart") << QStringLiteral("fallapart") << false;
......
......@@ -85,7 +85,6 @@ void TestScriptedEffectLoader::testHasEffect_data()
QTest::newRow("blur") << QStringLiteral("blur") << false;
QTest::newRow("Colorpicker") << QStringLiteral("colorpicker") << false;
QTest::newRow("Contrast") << QStringLiteral("contrast") << false;
QTest::newRow("CubeSlide") << QStringLiteral("cubeslide") << false;
QTest::newRow("DesktopGrid") << QStringLiteral("desktopgrid") << false;
QTest::newRow("DimInactive") << QStringLiteral("diminactive") << false;
QTest::newRow("FallApart") << QStringLiteral("fallapart") << false;
......
#!/usr/bin/env python3
import fileinput
for line in fileinput.input():
if not line.startswith("cubeslideEnabled="):
continue
value = line[len("cubeslideEnabled="):].strip()
if value == "true":
print("# DELETE cubeslideEnabled")
print("# DELETE slideEnabled") # make slide effect enabled, it's off now
......@@ -67,3 +67,9 @@ Id=remove-cover-switch-effect
File=kwinrc
Group=TabBox,TabBoxAlternative
Script=kwin-5.23-remove-cover-switch.py,python3
# Remove the Desktop Cube Animation effect
Id=remove-cubeslide-effect
File=kwinrc
Group=Plugins
Script=kwin-5.23-remove-cubeslide.py,python3
......@@ -83,7 +83,6 @@ set(kwin4_effect_builtins_sources
blur/blur.cpp
blur/blurshader.cpp
colorpicker/colorpicker.cpp
cubeslide/cubeslide.cpp
desktopgrid/desktopgrid.cpp
diminactive/diminactive.cpp
effect_builtins.cpp
......@@ -121,7 +120,6 @@ qt5_add_resources(kwin4_effect_builtins_sources shaders.qrc)
kconfig_add_kcfg_files(kwin4_effect_builtins_sources
blur/blurconfig.kcfgc
cubeslide/cubeslideconfig.kcfgc
desktopgrid/desktopgridconfig.kcfgc
diminactive/diminactiveconfig.kcfgc
fallapart/fallapartconfig.kcfgc
......@@ -193,7 +191,6 @@ add_subdirectory(zoom)
# OpenGL-specific effects
add_subdirectory(blur)
include(backgroundcontrast/CMakeLists.txt)
add_subdirectory(cubeslide)
add_subdirectory(glide)
add_subdirectory(invert)
add_subdirectory(lookingglass)
......
#######################################
# Config
set(kwin_cubeslide_config_SRCS cubeslide_config.cpp)
ki18n_wrap_ui(kwin_cubeslide_config_SRCS cubeslide_config.ui)
kconfig_add_kcfg_files(kwin_cubeslide_config_SRCS cubeslideconfig.kcfgc)
add_library(kwin_cubeslide_config MODULE ${kwin_cubeslide_config_SRCS})
target_link_libraries(kwin_cubeslide_config
KF5::ConfigWidgets
KF5::I18n
kwineffects
KWinEffectsInterface
)
kcoreaddons_desktop_to_json(kwin_cubeslide_config cubeslide_config.desktop SERVICE_TYPES kcmodule.desktop)
install(
TARGETS
kwin_cubeslide_config
DESTINATION
${KDE_INSTALL_PLUGINDIR}/kwin/effects/configs
)
This diff is collapsed.
/*
KWin - the KDE window manager
This file is part of the KDE project.
SPDX-FileCopyrightText: 2009 Martin Gräßlin <mgraesslin@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef KWIN_CUBESLIDE_H
#define KWIN_CUBESLIDE_H
#include <kwineffects.h>
#include <kwinglutils.h>
#include <QQueue>
#include <QSet>
#include <QTimeLine>
namespace KWin
{
class CubeSlideEffect
: public Effect
{
Q_OBJECT
Q_PROPERTY(int rotationDuration READ configuredRotationDuration)
Q_PROPERTY(bool dontSlidePanels READ isDontSlidePanels)
Q_PROPERTY(bool dontSlideStickyWindows READ isDontSlideStickyWindows)
Q_PROPERTY(bool usePagerLayout READ isUsePagerLayout)
Q_PROPERTY(bool useWindowMoving READ isUseWindowMoving)
public:
CubeSlideEffect();
~CubeSlideEffect() override;
void reconfigure(ReconfigureFlags) override;
void prePaintScreen(ScreenPrePaintData& data, std::chrono::milliseconds presentTime) override;
void paintScreen(int mask, const QRegion &region, ScreenPaintData& data) override;
void postPaintScreen() override;
void prePaintWindow(EffectWindow* w, WindowPrePaintData& data, std::chrono::milliseconds presentTime) override;
void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data) override;
bool isActive() const override;
int requestedEffectChainPosition() const override {
return 50;
}
static bool supported();
// for properties
int configuredRotationDuration() const {
return rotationDuration;
}
bool isDontSlidePanels() const {
return dontSlidePanels;
}
bool isDontSlideStickyWindows() const {
return dontSlideStickyWindows;
}
bool isUsePagerLayout() const {
return usePagerLayout;
}
bool isUseWindowMoving() const {
return useWindowMoving;
}
private Q_SLOTS:
void slotWindowAdded(EffectWindow* w);
void slotWindowDeleted(EffectWindow* w);
void slotDesktopChanged(int old, int current, EffectWindow* w);
void slotWindowStepUserMovedResized(KWin::EffectWindow *w);
void slotWindowFinishUserMovedResized(KWin::EffectWindow *w);
void slotNumberDesktopsChanged();
private:
enum RotationDirection {
Left,
Right,
Upwards,
Downwards
};
void paintSlideCube(int mask, QRegion region, ScreenPaintData& data);
void windowMovingChanged(float progress, RotationDirection direction);
bool shouldAnimate(const EffectWindow* w) const;
void startAnimation();
bool cube_painting;
int front_desktop;
int painting_desktop;
int other_desktop;
bool firstDesktop;
bool stickyPainting;
QSet<EffectWindow*> staticWindows;
QTimeLine timeLine;
std::chrono::milliseconds lastPresentTime;
QQueue<RotationDirection> slideRotations;
bool dontSlidePanels;
bool dontSlideStickyWindows;
bool usePagerLayout;
int rotationDuration;
bool useWindowMoving;
bool windowMoving;
bool desktopChangedWhileMoving;
double progressRestriction;
};
}
#endif
<?xml version="1.0" encoding="UTF-8"?>
<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
<kcfgfile arg="true"/>
<group name="Effect-CubeSlide">
<entry name="RotationDuration" type="Int">
<default>0</default>
</entry>
<entry name="DontSlidePanels" type="Bool">
<default>true</default>
</entry>
<entry name="DontSlideStickyWindows" type="Bool">
<default>true</default>
</entry>
<entry name="UsePagerLayout" type="Bool">
<default>true</default>
</entry>
<entry name="UseWindowMoving" type="Bool">
<default>false</default>
</entry>
</group>
</kcfg>
/*
KWin - the KDE window manager
This file is part of the KDE project.
SPDX-FileCopyrightText: 2009 Martin Gräßlin <mgraesslin@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "cubeslide_config.h"
// KConfigSkeleton
#include "cubeslideconfig.h"
#include <config-kwin.h>
#include <kwineffects_interface.h>
#include <kconfiggroup.h>
#include <KAboutData>
#include <KPluginFactory>
#include <QVBoxLayout>
K_PLUGIN_FACTORY_WITH_JSON(CubeSlideEffectConfigFactory,
"cubeslide_config.json",
registerPlugin<KWin::CubeSlideEffectConfig>();)
namespace KWin
{
CubeSlideEffectConfigForm::CubeSlideEffectConfigForm(QWidget* parent) : QWidget(parent)
{
setupUi(this);
}
CubeSlideEffectConfig::CubeSlideEffectConfig(QWidget* parent, const QVariantList& args) :
KCModule(parent, args)
{
m_ui = new CubeSlideEffectConfigForm(this);
QVBoxLayout* layout = new QVBoxLayout(this);
layout->addWidget(m_ui);
CubeSlideConfig::instance(KWIN_CONFIG);
addConfig(CubeSlideConfig::self(), m_ui);
load();
}
void CubeSlideEffectConfig::save()
{
KCModule::save();
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.KWin"),
QStringLiteral("/Effects"),
QDBusConnection::sessionBus());
interface.reconfigureEffect(QStringLiteral("cubeslide"));
}
} // namespace
#include "cubeslide_config.moc"
[Desktop Entry]
Type=Service
X-KDE-ServiceTypes=KCModule
X-KDE-Library=kwin_cubeslide_config
X-KDE-ParentComponents=cubeslide
Name=Desktop Cube Animation
Name[az]=Animasiyalı İş Masası kubu
Name[bg]=Кубична анимация върху работен плот
Name[bs]=Animacija kocke površi
Name[ca]=Animació de cub per a l'escriptori
Name[ca@valencia]=Animació de cub d'escriptori
Name[cs]=Animace kostky plochy
Name[csb]=Animacëjô Szescanu pùltu
Name[da]=Animeret skrivebordsterning
Name[de]=Animation Arbeitsflächen-Würfel
Name[el]=Εφέ κύβου επιφάνειας εργασίας
Name[en_GB]=Desktop Cube Animation
Name[eo]=Movbildo de Labortabla kubo
Name[es]=Animación del cubo de escritorio
Name[et]=Töölauakuubiku animeerimine
Name[eu]=Mahaigain kuboaren animazioa
Name[fi]=Työpöytäkuutioanimaatio
Name[fr]=Animation du bureau en cube
Name[fy]=Buroblêd kubus animaasje
Name[ga]=Beochan an Chiúib Deisce
Name[gl]=Animación do cubo do escritorio
Name[gu]=ડેસ્ટોપ ક્યુબ એનિમેશન
Name[he]=הנפשת שולחן עבודה בקובייה
Name[hi]=डेस्कटॉप घन एनिमेशन
Name[hr]=Animacija kocke s radnom površinom
Name[hu]=Asztalváltó kocka
Name[ia]=Animation de cubo de scriptorio
Name[id]=Animasi Kubus Desktop
Name[is]=Hreyfingar á skjáborðskubbi
Name[it]=Animazione del cubo dei desktop
Name[ja]=デスクトップキューブのアニメーション
Name[kk]=Үстел текшесін анимациялау
Name[km]=ការ​ធ្វើ​ឲ្យ​គូប​ផ្ទៃតុ​មាន​ចលនា​
Name[kn]=ಗಣಕತೆರೆ ಘನಾಕೃತಿಯ ಸಜೀವನ(ಎನಿಮೇಶನ್)
Name[ko]=데스크톱 큐브 애니메이션
Name[lt]=Darbalaukio kubo animacija
Name[lv]=Darbvirsmas kuba animācija
Name[mk]=Анимација „Работна коцка“
Name[ml]=പണിയിടം ക്യൂബ് നീക്കം
Name[mr]=डेस्कटॉप क्यूब ऍनीमेशन
Name[nb]=Animert skrivebordsterning
Name[nds]=Animeert Wörpel-Schriefdisch
Name[nl]=Animatie met bureaubladkubus
Name[nn]=Kubeskifte av skrivebord
Name[pa]=ਡੈਸਕਟਾਪ ਘਣ ਐਨੀਮੇਸ਼ਨ
Name[pl]=Animacja sześcianu pulpitów
Name[pt]=Animação do Cubo de Ecrãs
Name[pt_BR]=Animação do cubo de áreas de trabalho
Name[ro]=Animație Cub de birou
Name[ru]=Анимация куба рабочих столов
Name[si]=වැඩතල ඝනක සජීවීකරණය
Name[sk]=Animácia plochy na kocke
Name[sl]=Animacija kocka z namizji
Name[sr]=Анимација коцке површи
Name[sr@ijekavian]=Анимација коцке површи
Name[sr@ijekavianlatin]=Animacija kocke površi
Name[sr@latin]=Animacija kocke površi
Name[sv]=Animering med skrivbordskub
Name[th]=พื้นที่ทำงานทรงลูกบาศก์แบบเคลื่อนไหว
Name[tr]=Masaüstü Küp Animasyonu
Name[ug]=ئۈستەلئۈستى كۇب جانلاندۇرۇمى
Name[uk]=Анімація куба стільниць
Name[vi]=Hiệu ứng khối vuông màn hình
Name[wa]=Animåcion cube do scribannes
Name[x-test]=xxDesktop Cube Animationxx
Name[zh_CN]=3D 切换
Name[zh_TW]=桌面立方體動畫
/*
KWin - the KDE window manager
This file is part of the KDE project.
SPDX-FileCopyrightText: 2009 Martin Gräßlin <mgraesslin@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef KWIN_CUBESLIDE_CONFIG_H
#define KWIN_CUBESLIDE_CONFIG_H
#include <kcmodule.h>
#include "ui_cubeslide_config.h"
namespace KWin
{
class CubeSlideEffectConfigForm : public QWidget, public Ui::CubeSlideEffectConfigForm
{
Q_OBJECT
public:
explicit CubeSlideEffectConfigForm(QWidget* parent);
};
class CubeSlideEffectConfig : public KCModule
{
Q_OBJECT
public:
explicit CubeSlideEffectConfig(QWidget* parent = nullptr, const QVariantList& args = QVariantList());
public Q_SLOTS:
void save() override;
private:
CubeSlideEffectConfigForm* m_ui;
};
} // namespace
#endif
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>KWin::CubeSlideEffectConfigForm</class>
<widget class="QWidget" name="KWin::CubeSlideEffectConfigForm">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>431</width>
<height>161</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="kcfg_DontSlideStickyWindows">
<property name="text">
<string>Do not animate windows on all desktops</string>
</property>
</widget>
</item>
<item row="5" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="kcfg_RotationDuration">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="specialValueText">
<string comment="Duration of rotation">Default</string>
</property>
<property name="suffix">
<string> msec</string>
</property>
<property name="maximum">
<number>5000</number>
</property>
<property name="singleStep">
<number>10</number>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="kcfg_DontSlidePanels">
<property name="text">
<string>Do not animate panels</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Rotation duration:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>kcfg_RotationDuration</cstring>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="kcfg_UsePagerLayout">
<property name="text">
<string>Use pager layout for animation</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<widget class="QCheckBox" name="kcfg_UseWindowMoving">
<property name="text">
<string>Start animation when moving windows towards screen edges</string>
</property>
</widget>
</item>
</layout>
</widget>
<tabstops>
<tabstop>kcfg_RotationDuration</tabstop>
<tabstop>kcfg_DontSlidePanels</tabstop>
<tabstop>kcfg_DontSlideStickyWindows</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>
File=cubeslide.kcfg
ClassName=CubeSlideConfig
NameSpace=KWin
Singleton=true
Mutators=true
......@@ -33,7 +33,6 @@
#include "windowgeometry/windowgeometry.h"
#include "zoom/zoom.h"
// OpenGL-specific effects for desktop
#include "cubeslide/cubeslide.h"
#include "glide/glide.h"
#include "invert/invert.h"
#include "lookingglass/lookingglass.h"
......@@ -132,22 +131,6 @@ EFFECT_FALLBACK
#endif
EFFECT_FALLBACK
QString()
}, {
QStringLiteral("cubeslide"),
i18ndc("kwin_effects", "Name of a KWin Effect", "Desktop Cube Animation"),
i18ndc("kwin_effects", "Comment describing the KWin Effect", "Animate desktop switching with a cube"),
QStringLiteral("Virtual Desktop Switching Animation"),
QStringLiteral("desktop-animations"),
QUrl(QStringLiteral("https://files.kde.org/plasma/kwin/effect-videos/desktop_cube_animation.ogv")),
false,
false,
#ifdef EFFECT_BUILTINS
&createHelper<CubeSlideEffect>,
&CubeSlideEffect::supported,
nullptr,
#endif
EFFECT_FALLBACK
QStringLiteral("kwin_cubeslide_config")
}, {
QStringLiteral("desktopgrid"),
i18ndc("kwin_effects", "Name of a KWin Effect", "Desktop Grid"),
......
......@@ -26,7 +26,6 @@ enum class BuiltInEffect
Blur,
ColorPicker,
Contrast,
CubeSlide,
DesktopGrid,
DimInactive,
FallApart,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment