From 3c4686ca12416d449a3ac477af74bc2ac0344d4a Mon Sep 17 00:00:00 2001 From: Harald Sitter Date: Wed, 1 Mar 2023 12:49:07 +0100 Subject: [PATCH] tabletmodemanager: properly export properties in order to read from the properties directly (as opposed to via org.freedesktop.DBus.Properties.Get) we need to export slots despite the class having none (presumably the READ functions count as slots for the purposes of qdbus?) this makes direct calls to the interface work correctly `qdbus org.kde.KWin /org/kde/KWin org.kde.KWin.TabletModeManager.tabletMode` --- src/tabletmodemanager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tabletmodemanager.cpp b/src/tabletmodemanager.cpp index ce93eca68d..78c9afa0b0 100644 --- a/src/tabletmodemanager.cpp +++ b/src/tabletmodemanager.cpp @@ -1,5 +1,6 @@ /* SPDX-FileCopyrightText: 2018 Marco Martin + SPDX-FileCopyrightText: 2023 Harald Sitter SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL @@ -127,7 +128,8 @@ TabletModeManager::TabletModeManager() QDBusConnection::sessionBus().registerObject(QStringLiteral("/org/kde/KWin"), QStringLiteral("org.kde.KWin.TabletModeManager"), this, - QDBusConnection::ExportAllProperties | QDBusConnection::ExportAllSignals); + // NOTE: slots must be exported for properties to work correctly + QDBusConnection::ExportAllProperties | QDBusConnection::ExportAllSignals | QDBusConnection::ExportAllSlots); if (waylandServer()) { connect(input(), &InputRedirection::hasTabletModeSwitchChanged, this, &TabletModeManager::hasTabletModeInputChanged);