Attempt to unload the KWin plugin at the start of uninstall to prevent crashes
This commit is contained in:
parent
4e4281cf6f
commit
6be66ed8f9
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue