diff --git a/kwin/bin/breezy_kwin_uninstall b/kwin/bin/breezy_kwin_uninstall index 82f9c49..8f620b2 100755 --- a/kwin/bin/breezy_kwin_uninstall +++ b/kwin/bin/breezy_kwin_uninstall @@ -8,6 +8,18 @@ fi # we don't want the uninstall script to be able to cause a failure if being triggered by the setup script [ "$for_install" -eq 0 ] && set -e +if command -v qdbus >/dev/null 2>&1; then + QDBUS_CMD=$(command -v qdbus) +elif command -v qdbus6 >/dev/null 2>&1; then + QDBUS_CMD=$(command -v qdbus6) +fi + +if [ -n "$QDBUS_CMD" ]; then + if $QDBUS_CMD org.kde.KWin /Effects org.kde.kwin.Effects.unloadEffect breezy_desktop; then + [ "$for_install" -eq 0 ] && echo "Unloaded breezy_desktop effect" + fi +fi + USER_HOME=$(realpath ~) if [ "$for_install" -eq 0 ]; then UA_EVENT_NAME="breezy_kwin_uninstall" diff --git a/kwin/src/breezydesktopeffect.cpp b/kwin/src/breezydesktopeffect.cpp index 278f15e..0807139 100644 --- a/kwin/src/breezydesktopeffect.cpp +++ b/kwin/src/breezydesktopeffect.cpp @@ -273,11 +273,11 @@ void BreezyDesktopEffect::deactivate() void BreezyDesktopEffect::enableDriver() { qCCritical(KWIN_XR) << "\t\t\tBreezy - enableDriver"; - QJsonObject obj; - obj.insert(QStringLiteral("disabled"), false); - obj.insert(QStringLiteral("output_mode"), QStringLiteral("external_only")); - obj.insert(QStringLiteral("external_mode"), QStringLiteral("breezy_desktop")); - XRDriverIPC::instance().writeConfig(obj); + QJsonObject obj; + obj.insert(QStringLiteral("disabled"), false); + obj.insert(QStringLiteral("output_mode"), QStringLiteral("external_only")); + obj.insert(QStringLiteral("external_mode"), QStringLiteral("breezy_desktop")); + XRDriverIPC::instance().writeConfig(obj); } void BreezyDesktopEffect::disableDriver()