File indexing completed on 2024-11-10 04:56:26

0001 /*
0002     SPDX-FileCopyrightText: 2024 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include <KConfigGroup>
0008 #include <KSharedConfig>
0009 
0010 int main()
0011 {
0012     auto config = KSharedConfig::openConfig(QStringLiteral("kwinrc"));
0013 
0014     KConfigGroup windows = config->group(QStringLiteral("Windows"));
0015     if (!windows.exists()) {
0016         return EXIT_SUCCESS;
0017     }
0018 
0019     if (!windows.hasKey(QStringLiteral("ActiveMouseScreen"))) {
0020         return EXIT_SUCCESS;
0021     }
0022 
0023     windows.deleteEntry(QStringLiteral("ActiveMouseScreen"));
0024 
0025     return windows.sync() ? EXIT_SUCCESS : EXIT_FAILURE;
0026 }