mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
startupfeedback: Restore trigger from Plasma
This commit is contained in:
parent
b1e0d41505
commit
0c2f215a3f
2 changed files with 16 additions and 11 deletions
|
|
@ -10,9 +10,9 @@ import Qt5Compat.GraphicalEffects
|
|||
|
||||
import org.kde.kirigami 2.13 as Kirigami
|
||||
|
||||
import org.kde.plasma.private.nanoshell 2.0 as NanoShell
|
||||
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
||||
import org.kde.plasma.private.mobileshell.state 1.0 as MobileShellState
|
||||
import org.kde.plasma.private.mobileshell.state as MobileShellState
|
||||
import org.kde.plasma.private.mobileshell.windowplugin as WindowPlugin
|
||||
|
||||
/**
|
||||
* Component that animates an app opening from a location.
|
||||
|
|
@ -64,15 +64,15 @@ MouseArea { // use mousearea to ensure clicks don't go behind
|
|||
}
|
||||
|
||||
// open startupfeedback when notifier gives an app
|
||||
// Connections {
|
||||
// target: NanoShell.StartupNotifier
|
||||
// enabled: NanoShell.StartupNotifier.isValid
|
||||
//
|
||||
// function onActivationStarted(appId, iconName) {
|
||||
// icon.source = iconName
|
||||
// openAnimSimple.restart();
|
||||
// }
|
||||
// }
|
||||
Connections {
|
||||
target: WindowPlugin.WindowUtil
|
||||
|
||||
function onAppActivationStarted(appId, iconName) {
|
||||
console.log(appId);
|
||||
icon.source = iconName
|
||||
openAnimSimple.restart();
|
||||
}
|
||||
}
|
||||
|
||||
Kirigami.ImageColors {
|
||||
id: colorGenerator
|
||||
|
|
|
|||
|
|
@ -80,6 +80,11 @@ void WindowUtil::initWayland()
|
|||
|
||||
connect(iface, &PlasmaActivationFeedback::activation, this, [this](PlasmaActivation *activation) {
|
||||
connect(activation, &PlasmaActivation::applicationId, this, [this](const QString &appId) {
|
||||
// do not show activation screen for the plasmashell process
|
||||
if (appId == "org.kde.plasmashell") {
|
||||
return;
|
||||
}
|
||||
|
||||
const auto servicesFound = KApplicationTrader::query([&appId](const KService::Ptr &service) {
|
||||
if (service->exec().isEmpty())
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue