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`
This commit is contained in:
parent
7775fbd2db
commit
3c4686ca12
1 changed files with 3 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
/*
|
/*
|
||||||
SPDX-FileCopyrightText: 2018 Marco Martin <mart@kde.org>
|
SPDX-FileCopyrightText: 2018 Marco Martin <mart@kde.org>
|
||||||
|
SPDX-FileCopyrightText: 2023 Harald Sitter <sitter@kde.org>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
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"),
|
QDBusConnection::sessionBus().registerObject(QStringLiteral("/org/kde/KWin"),
|
||||||
QStringLiteral("org.kde.KWin.TabletModeManager"),
|
QStringLiteral("org.kde.KWin.TabletModeManager"),
|
||||||
this,
|
this,
|
||||||
QDBusConnection::ExportAllProperties | QDBusConnection::ExportAllSignals);
|
// NOTE: slots must be exported for properties to work correctly
|
||||||
|
QDBusConnection::ExportAllProperties | QDBusConnection::ExportAllSignals | QDBusConnection::ExportAllSlots);
|
||||||
|
|
||||||
if (waylandServer()) {
|
if (waylandServer()) {
|
||||||
connect(input(), &InputRedirection::hasTabletModeSwitchChanged, this, &TabletModeManager::hasTabletModeInputChanged);
|
connect(input(), &InputRedirection::hasTabletModeSwitchChanged, this, &TabletModeManager::hasTabletModeInputChanged);
|
||||||
|
|
Loading…
Reference in a new issue