kwin/kconf_update/kwin-6.0-reset-active-mouse-screen.cpp
Vlad Zahorodnii e7d6e8b217 kcms/options: Hide "active mouse screen" option
In the late Plasma 5 times we agreed that it would be better to drop
"active mouse screen" option and stick with last interacted screen
approach instead. However, it was forgotten and nobody has pursued this
goal, so let's hide the option in the system settings ui at least.

The option is not completely removed because some parts of kwin would
need adjustments.
2024-02-05 20:23:50 +02:00

26 lines
620 B
C++

/*
SPDX-FileCopyrightText: 2024 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include <KConfigGroup>
#include <KSharedConfig>
int main()
{
auto config = KSharedConfig::openConfig(QStringLiteral("kwinrc"));
KConfigGroup windows = config->group(QStringLiteral("Windows"));
if (!windows.exists()) {
return EXIT_SUCCESS;
}
if (!windows.hasKey(QStringLiteral("ActiveMouseScreen"))) {
return EXIT_SUCCESS;
}
windows.deleteEntry(QStringLiteral("ActiveMouseScreen"));
return windows.sync() ? EXIT_SUCCESS : EXIT_FAILURE;
}