diff --git a/autotests/kwindoweffectstest.cpp b/autotests/kwindoweffectstest.cpp --- a/autotests/kwindoweffectstest.cpp +++ b/autotests/kwindoweffectstest.cpp @@ -49,7 +49,9 @@ void testBlur_data(); void testBlur(); void testBlurDisable(); +#if KWINDOWSYSTEM_ENABLE_DEPRECATED_SINCE(5, 67) void testMarkAsDashboard(); +#endif void testEffectAvailable_data(); void testEffectAvailable(); @@ -362,6 +364,7 @@ performAtomIsRemoveTest(m_window->winId(), m_blur); } +#if KWINDOWSYSTEM_ENABLE_DEPRECATED_SINCE(5, 67) void KWindowEffectsTest::testMarkAsDashboard() { const QByteArray className = QByteArrayLiteral("dashboard"); @@ -390,6 +393,7 @@ data = data + 10; QCOMPARE(QByteArray(data), className); } +#endif void KWindowEffectsTest::testEffectAvailable_data() { @@ -401,7 +405,9 @@ QTest::newRow("PresentWindowsGroup") << KWindowEffects::PresentWindowsGroup << QByteArrayLiteral("_KDE_PRESENT_WINDOWS_GROUP"); QTest::newRow("HighlightWindows") << KWindowEffects::HighlightWindows << QByteArrayLiteral("_KDE_WINDOW_HIGHLIGHT"); QTest::newRow("BlurBehind") << KWindowEffects::BlurBehind << QByteArrayLiteral("_KDE_NET_WM_BLUR_BEHIND_REGION"); +#if KWINDOWSYSTEM_ENABLE_DEPRECATED_SINCE(5, 67) QTest::newRow("Dashboard") << KWindowEffects::Dashboard << QByteArrayLiteral("_WM_EFFECT_KDE_DASHBOARD"); +#endif QTest::newRow("BackgroundContrast") << KWindowEffects::BackgroundContrast << QByteArrayLiteral("_KDE_NET_WM_BACKGROUND_CONTRAST_REGION"); } diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -76,7 +76,7 @@ GROUP_BASE_NAME KF VERSION ${KF5_VERSION} DEPRECATED_BASE_VERSION 0 - DEPRECATION_VERSIONS 5.0 5.18 5.38 5.62 + DEPRECATION_VERSIONS 5.0 5.18 5.38 5.62 5.67 EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT} ) diff --git a/src/kwindoweffects.h b/src/kwindoweffects.h --- a/src/kwindoweffects.h +++ b/src/kwindoweffects.h @@ -36,7 +36,9 @@ PresentWindowsGroup = 4, HighlightWindows = 5, BlurBehind = 7, +#if KWINDOWSYSTEM_ENABLE_DEPRECATED_SINCE(5, 67) Dashboard = 8, +#endif BackgroundContrast = 9 }; @@ -153,14 +155,18 @@ */ KWINDOWSYSTEM_EXPORT void enableBackgroundContrast(WId window, bool enable = true, qreal contrast = 1, qreal intensity = 1, qreal saturation = 1, const QRegion ®ion = QRegion()); +#if KWINDOWSYSTEM_ENABLE_DEPRECATED_SINCE(5, 67) /** * Instructs the window manager to handle the given window as dashboard window as * Dashboard windows should be handled diffrently and may have special effects * applied to them. * * @param window The window for which to enable the blur effect + * @deprecated since 5.67, support for dashboard windows was removed */ +KWINDOWSYSTEM_DEPRECATED_VERSION(5, 67, "Support for dashboard windows was removed") KWINDOWSYSTEM_EXPORT void markAsDashboard(WId window); +#endif } #endif diff --git a/src/kwindoweffects.cpp b/src/kwindoweffects.cpp --- a/src/kwindoweffects.cpp +++ b/src/kwindoweffects.cpp @@ -55,10 +55,12 @@ KWindowSystemPluginWrapper::self().effects()->highlightWindows(controller, ids); } +#if KWINDOWSYSTEM_BUILD_DEPRECATED_SINCE(5, 67) void markAsDashboard(WId window) { KWindowSystemPluginWrapper::self().effects()->markAsDashboard(window); } +#endif void presentWindows(WId controller, const QList< WId > &ids) { diff --git a/src/kwindoweffects_dummy.cpp b/src/kwindoweffects_dummy.cpp --- a/src/kwindoweffects_dummy.cpp +++ b/src/kwindoweffects_dummy.cpp @@ -84,7 +84,9 @@ Q_UNUSED(region) } +#if KWINDOWSYSTEM_BUILD_DEPRECATED_SINCE(5, 67) void KWindowEffectsPrivateDummy::markAsDashboard(WId window) { Q_UNUSED(window) } +#endif diff --git a/src/kwindoweffects_dummy_p.h b/src/kwindoweffects_dummy_p.h --- a/src/kwindoweffects_dummy_p.h +++ b/src/kwindoweffects_dummy_p.h @@ -34,7 +34,9 @@ void highlightWindows(WId controller, const QList &ids) override; void enableBlurBehind(WId window, bool enable = true, const QRegion& region = QRegion()) override; void enableBackgroundContrast(WId window, bool enable = true, qreal contrast = 1, qreal intensity = 1, qreal saturation = 1, const QRegion ®ion = QRegion()) override; +#if KWINDOWSYSTEM_BUILD_DEPRECATED_SINCE(5, 67) void markAsDashboard(WId window) override; +#endif }; #endif diff --git a/src/kwindoweffects_p.h b/src/kwindoweffects_p.h --- a/src/kwindoweffects_p.h +++ b/src/kwindoweffects_p.h @@ -33,7 +33,9 @@ virtual void highlightWindows(WId controller, const QList &ids) = 0; virtual void enableBlurBehind(WId window, bool enable = true, const QRegion ®ion = QRegion()) = 0; virtual void enableBackgroundContrast(WId window, bool enable = true, qreal contrast = 1, qreal intensity = 1, qreal saturation = 1, const QRegion ®ion = QRegion()) = 0; +#if KWINDOWSYSTEM_BUILD_DEPRECATED_SINCE(5, 67) virtual void markAsDashboard(WId window) = 0; +#endif protected: KWindowEffectsPrivate(); }; diff --git a/src/platforms/xcb/kwindoweffects.cpp b/src/platforms/xcb/kwindoweffects.cpp --- a/src/platforms/xcb/kwindoweffects.cpp +++ b/src/platforms/xcb/kwindoweffects.cpp @@ -28,7 +28,6 @@ #include #include -static const char DASHBOARD_WIN_CLASS[] = "dashboard\0dashboard"; using namespace KWindowEffects; KWindowEffectsPrivateX11::KWindowEffectsPrivateX11() @@ -62,10 +61,12 @@ case BlurBehind: effectName = QByteArrayLiteral("_KDE_NET_WM_BLUR_BEHIND_REGION"); break; +#if KWINDOWSYSTEM_BUILD_DEPRECATED_SINCE(5, 67) case Dashboard: // TODO: Better namespacing for atoms effectName = QByteArrayLiteral("_WM_EFFECT_KDE_DASHBOARD"); break; +#endif case BackgroundContrast: effectName = QByteArrayLiteral("_KDE_NET_WM_BACKGROUND_CONTRAST_REGION"); break; @@ -331,13 +332,15 @@ } } +#if KWINDOWSYSTEM_BUILD_DEPRECATED_SINCE(5, 67) void KWindowEffectsPrivateX11::markAsDashboard(WId window) { + static const char DASHBOARD_WIN_CLASS[] = "dashboard\0dashboard"; xcb_connection_t *c = QX11Info::connection(); if (!c) { return; } xcb_change_property(c, XCB_PROP_MODE_REPLACE, window, XCB_ATOM_WM_CLASS, XCB_ATOM_STRING, 8, 19, DASHBOARD_WIN_CLASS); } - +#endif diff --git a/src/platforms/xcb/kwindoweffects_x11.h b/src/platforms/xcb/kwindoweffects_x11.h --- a/src/platforms/xcb/kwindoweffects_x11.h +++ b/src/platforms/xcb/kwindoweffects_x11.h @@ -34,7 +34,9 @@ void highlightWindows(WId controller, const QList &ids) override; void enableBlurBehind(WId window, bool enable = true, const QRegion& region = QRegion()) override; void enableBackgroundContrast(WId window, bool enable = true, qreal contrast = 1, qreal intensity = 1, qreal saturation = 1, const QRegion ®ion = QRegion()) override; +#if KWINDOWSYSTEM_BUILD_DEPRECATED_SINCE(5, 67) void markAsDashboard(WId window) override; +#endif }; #endif