kcms/tabbox: Do not automatically disable highlightWindows effect

highlightWindows is an internal effect used to highlight one specific
window whilst hiding all others. It's used by the tabbox and by
plasmashell's task manager when hovering over a thumbnail.

The user may enable or disable usage of this effect for the main and
alternative task switcher. If it is enabled for neither, we currently
disable the entire effect, regardless of whether or not it is still in
use by plasmashell. This is not visible immediately, but will take until
the next reboot or login to become active.

As a dedicated configuration toggle for this internal effect is missing,
the user cannot reasonably enable this feature again. They would have to
know to enable either task switcher to use this effect again and, since
the effect isn't reloaded automatically, reboot or relogin.

Since this is an internal effect, we should simply not allow it to be
disabled globally via either task switcher setting. Both tabbox and
plasmashell already carry their own configuration settings to enable
usage of this effect, so users can still tweak the behaviour there
without also affecting other components.
wilder/Plasma/6.3
Wolfgang Müller 1 year ago committed by Vlad Zahorodnii
parent 00f10569b3
commit 407cee8825
  1. 2
      src/kcms/tabbox/CMakeLists.txt
  2. 12
      src/kcms/tabbox/kwinpluginssettings.kcfg
  3. 6
      src/kcms/tabbox/kwinpluginssettings.kcfgc
  4. 7
      src/kcms/tabbox/kwintabboxdata.cpp
  5. 3
      src/kcms/tabbox/kwintabboxdata.h
  6. 10
      src/kcms/tabbox/main.cpp

@ -14,7 +14,7 @@ set(kcm_kwintabbox_PART_SRCS
ki18n_wrap_ui(kcm_kwintabbox_PART_SRCS main.ui)
qt_add_dbus_interface(kcm_kwintabbox_PART_SRCS ${KWin_SOURCE_DIR}/src/org.kde.kwin.Effects.xml kwin_effects_interface)
kconfig_add_kcfg_files(kcm_kwintabbox_PART_SRCS kwintabboxsettings.kcfgc kwinswitcheffectsettings.kcfgc kwinpluginssettings.kcfgc)
kconfig_add_kcfg_files(kcm_kwintabbox_PART_SRCS kwintabboxsettings.kcfgc kwinswitcheffectsettings.kcfgc)
kcoreaddons_add_plugin(kcm_kwintabbox SOURCES ${kcm_kwintabbox_PART_SRCS} INSTALL_NAMESPACE "plasma/kcms/systemsettings_qwidgets")
kcmutils_generate_desktop_file(kcm_kwintabbox)

@ -1,12 +0,0 @@
<?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 name="kwinrc" />
<group name="Plugins">
<entry key="highlightwindowEnabled" type="Bool">
<default>true</default>
</entry>
</group>
</kcfg>

@ -1,6 +0,0 @@
File=kwinpluginssettings.kcfg
NameSpace=KWin::TabBox
ClassName=PluginsSettings
Mutators=true
DefaultValueGetters=true
ParentInConstructor=true

@ -9,7 +9,6 @@
#include "kwintabboxdata.h"
#include "kwinpluginssettings.h"
#include "kwinswitcheffectsettings.h"
#include "kwintabboxsettings.h"
#include "shortcutsettings.h"
@ -23,7 +22,6 @@ KWinTabboxData::KWinTabboxData(QObject *parent)
: KCModuleData(parent)
, m_tabBoxConfig(new TabBoxSettings(QStringLiteral("TabBox"), this))
, m_tabBoxAlternativeConfig(new TabBoxSettings(QStringLiteral("TabBoxAlternative"), this))
, m_pluginsConfig(new PluginsSettings(this))
, m_shortcutConfig(new ShortcutSettings(this))
{
registerSkeleton(m_tabBoxConfig);
@ -41,11 +39,6 @@ TabBoxSettings *KWinTabboxData::tabBoxAlternativeConfig() const
return m_tabBoxAlternativeConfig;
}
PluginsSettings *KWinTabboxData::pluginsConfig() const
{
return m_pluginsConfig;
}
ShortcutSettings *KWinTabboxData::shortcutConfig() const
{
return m_shortcutConfig;

@ -19,7 +19,6 @@ namespace TabBox
{
class TabBoxSettings;
class SwitchEffectSettings;
class PluginsSettings;
class ShortcutSettings;
class KWinTabboxData : public KCModuleData
@ -31,13 +30,11 @@ public:
TabBoxSettings *tabBoxConfig() const;
TabBoxSettings *tabBoxAlternativeConfig() const;
PluginsSettings *pluginsConfig() const;
ShortcutSettings *shortcutConfig() const;
private:
TabBoxSettings *m_tabBoxConfig;
TabBoxSettings *m_tabBoxAlternativeConfig;
PluginsSettings *m_pluginsConfig;
ShortcutSettings *m_shortcutConfig;
};

@ -37,7 +37,6 @@
#include <KPackage/PackageLoader>
// own
#include "kwinpluginssettings.h"
#include "kwintabboxconfigform.h"
#include "kwintabboxdata.h"
#include "kwintabboxsettings.h"
@ -229,8 +228,6 @@ void KWinTabBoxConfig::load()
m_data->tabBoxAlternativeConfig()->load();
m_data->shortcutConfig()->load();
m_data->pluginsConfig()->load();
m_primaryTabBoxUi->updateUiFromConfig();
m_alternativeTabBoxUi->updateUiFromConfig();
@ -239,13 +236,6 @@ void KWinTabBoxConfig::load()
void KWinTabBoxConfig::save()
{
// effects
const bool highlightWindows = m_primaryTabBoxUi->highlightWindows() || m_alternativeTabBoxUi->highlightWindows();
// activate effects if they are used otherwise deactivate them.
m_data->pluginsConfig()->setHighlightwindowEnabled(highlightWindows);
m_data->pluginsConfig()->save();
m_data->tabBoxConfig()->save();
m_data->tabBoxAlternativeConfig()->save();
m_data->shortcutConfig()->save();

Loading…
Cancel
Save