Decouple activation feedback from window management

icc-effect-5.26.4
Vlad Zahorodnii 2021-08-22 12:49:57 +03:00
parent e227e93792
commit 7ffd72cbfa
3 changed files with 17 additions and 2 deletions

View File

@ -129,7 +129,14 @@ public:
return KWin::fetchRequestedInterfaces(client->executablePath());
}
const QSet<QByteArray> interfacesBlackList = {"org_kde_kwin_remote_access_manager", "org_kde_plasma_window_management", "org_kde_kwin_fake_input", "org_kde_kwin_keystate", "zkde_screencast_unstable_v1"};
const QSet<QByteArray> interfacesBlackList = {
QByteArrayLiteral("org_kde_kwin_remote_access_manager"),
QByteArrayLiteral("org_kde_plasma_window_management"),
QByteArrayLiteral("org_kde_kwin_fake_input"),
QByteArrayLiteral("org_kde_kwin_keystate"),
QByteArrayLiteral("zkde_screencast_unstable_v1"),
QByteArrayLiteral("org_kde_plasma_activation_feedback"),
};
const QSet<QByteArray> inputmethodInterfaces = { "zwp_input_panel_v1", "zwp_input_method_v1" };
@ -505,6 +512,8 @@ bool WaylandServer::init(InitializationFlags flags)
m_virtualDesktopManagement = new PlasmaVirtualDesktopManagementInterface(m_display, m_display);
m_windowManagement->setPlasmaVirtualDesktopManagementInterface(m_virtualDesktopManagement);
m_plasmaActivationFeedback = new PlasmaWindowActivationFeedbackInterface(m_display, m_display);
new ShadowManagerInterface(m_display, m_display);
new DpmsManagerInterface(m_display, m_display);

View File

@ -47,6 +47,7 @@ class ServerSideDecorationPaletteManagerInterface;
class SurfaceInterface;
class OutputInterface;
class PlasmaShellInterface;
class PlasmaWindowActivationFeedbackInterface;
class PlasmaVirtualDesktopManagementInterface;
class PlasmaWindowManagementInterface;
class OutputManagementInterface;
@ -116,6 +117,10 @@ public:
{
return m_dataDeviceManager;
}
KWaylandServer::PlasmaWindowActivationFeedbackInterface *plasmaActivationFeedback() const
{
return m_plasmaActivationFeedback;
}
KWaylandServer::PlasmaVirtualDesktopManagementInterface *virtualDesktopManagement() const
{
return m_virtualDesktopManagement;
@ -279,6 +284,7 @@ private:
KWaylandServer::TabletManagerV2Interface *m_tabletManagerV2 = nullptr;
KWaylandServer::DataDeviceManagerInterface *m_dataDeviceManager = nullptr;
KWaylandServer::PlasmaShellInterface *m_plasmaShell = nullptr;
KWaylandServer::PlasmaWindowActivationFeedbackInterface *m_plasmaActivationFeedback = nullptr;
KWaylandServer::PlasmaWindowManagementInterface *m_windowManagement = nullptr;
KWaylandServer::PlasmaVirtualDesktopManagementInterface *m_virtualDesktopManagement = nullptr;
KWaylandServer::ServerSideDecorationManagerInterface *m_decorationManager = nullptr;

View File

@ -52,7 +52,7 @@ XdgActivationV1Integration::XdgActivationV1Integration(XdgActivationV1Interface
if (m_currentActivationToken) {
clear();
}
QSharedPointer<PlasmaWindowActivationInterface> pwActivation(waylandServer()->windowManagement()->createActivation(appId));
QSharedPointer<PlasmaWindowActivationInterface> pwActivation(waylandServer()->plasmaActivationFeedback()->createActivation(appId));
m_currentActivationToken.reset(new ActivationToken{newToken, client, surface, serial, seat, appId, pwActivation});
if (!appId.isEmpty()) {
const auto icon = QIcon::fromTheme(AbstractClient::iconFromDesktopFile(appId), QIcon::fromTheme(QStringLiteral("system-run")));