Update all Breezy setup scripts and apps to request the necessary license features, v2.8.0
This commit is contained in:
parent
beea5582d8
commit
00f16c7900
|
|
@ -168,4 +168,7 @@ else
|
|||
sudo bin/xr_driver_setup -v $1 $(pwd)/xrDriver.tar.gz
|
||||
fi
|
||||
|
||||
echo "END - xr_driver_setup"
|
||||
echo "END - xr_driver_setup"
|
||||
|
||||
echo "Setting up productivity features"
|
||||
printf "request_features=productivity_basic\n" >> /dev/shm/xr_driver_control 2>/dev/null || true
|
||||
|
|
@ -67,6 +67,9 @@ export default class BreezyDesktopExtension extends Extension {
|
|||
try {
|
||||
Globals.extension_dir = this.path;
|
||||
|
||||
// safe to request on each load, acts as a no-op if already present
|
||||
this._write_control('request_features', 'productivity_basic');
|
||||
|
||||
Globals.data_stream.start();
|
||||
|
||||
this._monitor_manager = new MonitorManager({
|
||||
|
|
|
|||
|
|
@ -199,4 +199,7 @@ fi
|
|||
|
||||
echo "END - xr_driver_setup"
|
||||
|
||||
echo "Setting up productivity features"
|
||||
printf "request_features=productivity_basic\n" >> /dev/shm/xr_driver_control 2>/dev/null || true
|
||||
|
||||
printf "\n\033[1;33m!!! IMPORTANT !!!\033[0m You must log out and back in, then enable Breezy Desktop from the Desktop Effects in System Settings\n\n"
|
||||
|
|
@ -112,6 +112,16 @@ namespace KWin
|
|||
BreezyDesktopEffect::BreezyDesktopEffect()
|
||||
{
|
||||
qCCritical(KWIN_XR) << "\t\t\tBreezy - constructor";
|
||||
|
||||
// safe to request on each load, acts as a no-op if already present
|
||||
{
|
||||
QJsonObject flags;
|
||||
QJsonArray requested;
|
||||
requested.append(QStringLiteral("productivity_basic"));
|
||||
flags.insert(QStringLiteral("request_features"), requested);
|
||||
XRDriverIPC::instance().writeControlFlags(flags);
|
||||
}
|
||||
|
||||
qmlRegisterUncreatableType<BreezyDesktopEffect>("org.kde.kwin.effect.breezy_desktop", 1, 0, "BreezyDesktopEffect", QStringLiteral("BreezyDesktop cannot be created in QML"));
|
||||
|
||||
setupGlobalShortcut(
|
||||
|
|
|
|||
|
|
@ -204,6 +204,15 @@ BreezyDesktopEffectConfig::BreezyDesktopEffectConfig(QObject *parent, const KPlu
|
|||
ui.setupUi(widget());
|
||||
addConfig(BreezyDesktopConfig::self(), widget());
|
||||
|
||||
// safe to request on each load, acts as a no-op if already present
|
||||
{
|
||||
QJsonObject flags;
|
||||
QJsonArray requested;
|
||||
requested.append(QStringLiteral("productivity_basic"));
|
||||
flags.insert(QStringLiteral("request_features"), requested);
|
||||
XRDriverIPC::instance().writeControlFlags(flags);
|
||||
}
|
||||
|
||||
// Advanced tab: measurement units selector (stored as "cm" or "in")
|
||||
if (ui.comboMeasurementUnits) {
|
||||
ui.comboMeasurementUnits->clear();
|
||||
|
|
@ -725,6 +734,7 @@ void BreezyDesktopEffectConfig::pollDriverState()
|
|||
auto configJsonOpt = XRDriverIPC::instance().retrieveConfig();
|
||||
if (!stateJsonOpt || !configJsonOpt) return;
|
||||
auto stateJson = stateJsonOpt.value();
|
||||
|
||||
m_connectedDeviceBrand = stateJson.value(QStringLiteral("connected_device_brand")).toString();
|
||||
m_connectedDeviceModel = stateJson.value(QStringLiteral("connected_device_model")).toString();
|
||||
m_connectedDeviceFullDistanceCm = stateJson.value(QStringLiteral("connected_device_full_distance_cm")).toDouble(0.0);
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ class BreezydesktopApplication(Adw.Application):
|
|||
|
||||
# always do this on start-up since the driver sometimes fails to update the license on boot,
|
||||
# prevent showing a license warning unnecessarily
|
||||
XRDriverIPC.get_instance().write_control_flags({'refresh_device_license': True})
|
||||
XRDriverIPC.get_instance().write_control_flags({'request_features': ['productivity_basic']})
|
||||
|
||||
def do_activate(self):
|
||||
"""Called when the application is activated.
|
||||
|
|
|
|||
|
|
@ -166,4 +166,7 @@ else
|
|||
bin/xr_driver_setup -v $1 $(pwd)/xrDriver.tar.gz
|
||||
fi
|
||||
|
||||
echo "END - xr_driver_setup"
|
||||
echo "END - xr_driver_setup"
|
||||
|
||||
echo "Setting up gaming features"
|
||||
printf "request_features=sbs,smooth_follow\n" >> /dev/shm/xr_driver_control 2>/dev/null || true
|
||||
Loading…
Reference in New Issue