Changeset View
Changeset View
Standalone View
Standalone View
dbusinterface.cpp
Show First 20 Lines • Show All 303 Lines • ▼ Show 20 Line(s) | |||||
304 | 304 | | |||
305 | bool CompositorDBusInterface::platformRequiresCompositing() const | 305 | bool CompositorDBusInterface::platformRequiresCompositing() const | ||
306 | { | 306 | { | ||
307 | return kwinApp()->platform()->requiresCompositing(); | 307 | return kwinApp()->platform()->requiresCompositing(); | ||
308 | } | 308 | } | ||
309 | 309 | | |||
310 | void CompositorDBusInterface::resume() | 310 | void CompositorDBusInterface::resume() | ||
311 | { | 311 | { | ||
312 | m_compositor->resume(Compositor::ScriptSuspend); | 312 | if (kwinApp()->operationMode() == Application::OperationModeX11) { | ||
313 | static_cast<X11Compositor*>(m_compositor)->resume(X11Compositor::ScriptSuspend); | ||||
zzag: I know that I already mentioned the problem with whitespace before pointers, but this one may… | |||||
It does not make sense to put a whitespace in this case, since there is no identifier to the right of the asterisks. Sticking to rules is fine, as long as it makes sense. romangg: It does not make sense to put a whitespace in this case, since there is no identifier to the… | |||||
Why not add matching virtual function in base, doing nothing in Wayland, every time i see exclusive check on polymorphic type is just weak design. anthonyfieroni: Why not add matching virtual function in base, doing nothing in Wayland, every time i see… | |||||
314 | } | ||||
313 | } | 315 | } | ||
314 | 316 | | |||
315 | void CompositorDBusInterface::suspend() | 317 | void CompositorDBusInterface::suspend() | ||
316 | { | 318 | { | ||
317 | m_compositor->suspend(Compositor::ScriptSuspend); | 319 | if (kwinApp()->operationMode() == Application::OperationModeX11) { | ||
320 | static_cast<X11Compositor*>(m_compositor)->suspend(X11Compositor::ScriptSuspend); | ||||
321 | } | ||||
318 | } | 322 | } | ||
319 | 323 | | |||
320 | void CompositorDBusInterface::reinitialize() | 324 | void CompositorDBusInterface::reinitialize() | ||
321 | { | 325 | { | ||
322 | m_compositor->reinitialize(); | 326 | m_compositor->reinitialize(); | ||
323 | } | 327 | } | ||
324 | 328 | | |||
325 | QStringList CompositorDBusInterface::supportedOpenGLPlatformInterfaces() const | 329 | QStringList CompositorDBusInterface::supportedOpenGLPlatformInterfaces() const | ||
▲ Show 20 Lines • Show All 193 Lines • Show Last 20 Lines |
I know that I already mentioned the problem with whitespace before pointers, but this one may not be obvious.
"For pointers or references, use a single space before '*' or '&', but not after"
applies to templates as well, so the static_cast will look like
(I hope that one day we will be able to run clang-format over KWin's code bbase)