Add activeOutputName to DBus interface

Provide the name of the active output via the DBus interface, so it can
be used by other components, like KRunner (see bug 427069).

CCBUG: 427069
This commit is contained in:
Martin Seher 2022-04-07 21:26:47 +00:00 committed by Nate Graham
parent 121004ebfd
commit 3521631bbb
3 changed files with 10 additions and 0 deletions

View file

@ -15,6 +15,7 @@
// kwin
#include "abstract_client.h"
#include "abstract_output.h"
#include "atoms.h"
#include "composite.h"
#include "debug_console.h"
@ -129,6 +130,11 @@ WRAP(QString, supportInformation)
#undef WRAP
QString DBusInterface::activeOutputName()
{
return Workspace::self()->activeOutput()->name();
}
bool DBusInterface::startActivity(const QString &in0)
{
#if KWIN_BUILD_ACTIVITIES

View file

@ -56,6 +56,7 @@ public Q_SLOTS: // METHODS
bool startActivity(const QString &in0);
bool stopActivity(const QString &in0);
QString supportInformation();
QString activeOutputName();
Q_NOREPLY void unclutterDesktop();
Q_NOREPLY void showDebugConsole();

View file

@ -35,6 +35,9 @@
<method name="supportInformation">
<arg type="s" direction="out"/>
</method>
<method name="activeOutputName">
<arg type="s" direction="out"/>
</method>
<method name="showDebugConsole"/>
<method name="replace"/>
<method name="queryWindowInfo">