Changeset View
Changeset View
Standalone View
Standalone View
dbusinterface.cpp
Show All 22 Lines | |||||
23 | #include "compositingadaptor.h" | 23 | #include "compositingadaptor.h" | ||
24 | #include "virtualdesktopmanageradaptor.h" | 24 | #include "virtualdesktopmanageradaptor.h" | ||
25 | 25 | | |||
26 | // kwin | 26 | // kwin | ||
27 | #include "abstract_client.h" | 27 | #include "abstract_client.h" | ||
28 | #include "atoms.h" | 28 | #include "atoms.h" | ||
29 | #include "composite.h" | 29 | #include "composite.h" | ||
30 | #include "debug_console.h" | 30 | #include "debug_console.h" | ||
31 | #ifdef KWIN_BUILD_PERF | ||||
32 | #include "helpers/perf/ftrace_marker.h" | ||||
33 | #endif | ||||
31 | #include "main.h" | 34 | #include "main.h" | ||
32 | #include "placement.h" | 35 | #include "placement.h" | ||
33 | #include "platform.h" | 36 | #include "platform.h" | ||
34 | #include "kwinadaptor.h" | 37 | #include "kwinadaptor.h" | ||
35 | #include "scene.h" | 38 | #include "scene.h" | ||
36 | #include "workspace.h" | 39 | #include "workspace.h" | ||
37 | #include "virtualdesktops.h" | 40 | #include "virtualdesktops.h" | ||
38 | #ifdef KWIN_BUILD_ACTIVITIES | 41 | #ifdef KWIN_BUILD_ACTIVITIES | ||
▲ Show 20 Lines • Show All 145 Lines • ▼ Show 20 Line(s) | |||||
184 | } | 187 | } | ||
185 | 188 | | |||
186 | void DBusInterface::showDebugConsole() | 189 | void DBusInterface::showDebugConsole() | ||
187 | { | 190 | { | ||
188 | DebugConsole *console = new DebugConsole; | 191 | DebugConsole *console = new DebugConsole; | ||
189 | console->show(); | 192 | console->show(); | ||
190 | } | 193 | } | ||
191 | 194 | | |||
195 | bool DBusInterface::enableFtrace(bool enable) | ||||
196 | { | ||||
197 | #ifdef KWIN_BUILD_PERF | ||||
198 | if (!Perf::FtraceMarker::self()) { | ||||
199 | return false; | ||||
200 | } | ||||
201 | return Perf::FtraceMarker::self()->setEnabled(enable); | ||||
202 | #else | ||||
203 | Q_UNUSED(enable) | ||||
apol: Add a warning? | |||||
romangg: I used what David proposed (DBus error message). | |||||
204 | return false; | ||||
205 | #endif | ||||
206 | } | ||||
207 | | ||||
192 | namespace { | 208 | namespace { | ||
193 | QVariantMap clientToVariantMap(const AbstractClient *c) | 209 | QVariantMap clientToVariantMap(const AbstractClient *c) | ||
194 | { | 210 | { | ||
195 | return { | 211 | return { | ||
196 | {QStringLiteral("resourceClass"), c->resourceClass()}, | 212 | {QStringLiteral("resourceClass"), c->resourceClass()}, | ||
197 | {QStringLiteral("resourceName"), c->resourceName()}, | 213 | {QStringLiteral("resourceName"), c->resourceName()}, | ||
198 | {QStringLiteral("desktopFile"), c->desktopFileName()}, | 214 | {QStringLiteral("desktopFile"), c->desktopFileName()}, | ||
199 | {QStringLiteral("role"), c->windowRole()}, | 215 | {QStringLiteral("role"), c->windowRole()}, | ||
▲ Show 20 Lines • Show All 323 Lines • Show Last 20 Lines |
Add a warning?