From 74cb7a5b45bd3ec7b634c9362ba17a4822a464e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9ven=20Car?= Date: Sat, 4 Sep 2021 08:41:11 +0200 Subject: [PATCH] kcm compositing: Hide preview option in Wayland --- src/kcmkwin/kwincompositing/CMakeLists.txt | 1 + src/kcmkwin/kwincompositing/compositing.ui | 2 +- src/kcmkwin/kwincompositing/main.cpp | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/kcmkwin/kwincompositing/CMakeLists.txt b/src/kcmkwin/kwincompositing/CMakeLists.txt index 33226d080d..3d6bf42cd5 100644 --- a/src/kcmkwin/kwincompositing/CMakeLists.txt +++ b/src/kcmkwin/kwincompositing/CMakeLists.txt @@ -27,6 +27,7 @@ target_link_libraries(kwincompositing KF5::CoreAddons KF5::I18n KF5::KCMUtils + KF5::WindowSystem ) install(TARGETS kwincompositing DESTINATION ${KDE_INSTALL_PLUGINDIR}) diff --git a/src/kcmkwin/kwincompositing/compositing.ui b/src/kcmkwin/kwincompositing/compositing.ui index 6222b85b17..cf70d7ba35 100644 --- a/src/kcmkwin/kwincompositing/compositing.ui +++ b/src/kcmkwin/kwincompositing/compositing.ui @@ -216,7 +216,7 @@ you can reset this protection but be aware that this might result in an immediat - + Keep window thumbnails: diff --git a/src/kcmkwin/kwincompositing/main.cpp b/src/kcmkwin/kwincompositing/main.cpp index a1cade857a..e5fe6aebe5 100644 --- a/src/kcmkwin/kwincompositing/main.cpp +++ b/src/kcmkwin/kwincompositing/main.cpp @@ -18,6 +18,7 @@ #include #include +#include #include #include @@ -90,6 +91,10 @@ KWinCompositingKCM::KWinCompositingKCM(QWidget *parent, const QVariantList &args connect(this, &KWinCompositingKCM::defaultsIndicatorsVisibleChanged, this, &KWinCompositingKCM::updateUnmanagedItemStatus); + if (KWindowSystem::isPlatformWayland()) { + m_form.kcfg_HiddenPreviews->setVisible(false); + m_form.label_HiddenPreviews->setVisible(false); + } init(); }