Changeset View
Changeset View
Standalone View
Standalone View
decorations/decoratedclient.cpp
Show All 18 Lines | |||||
19 | *********************************************************************/ | 19 | *********************************************************************/ | ||
20 | #include "decoratedclient.h" | 20 | #include "decoratedclient.h" | ||
21 | #include "decorationpalette.h" | 21 | #include "decorationpalette.h" | ||
22 | #include "decorationrenderer.h" | 22 | #include "decorationrenderer.h" | ||
23 | #include "abstract_client.h" | 23 | #include "abstract_client.h" | ||
24 | #include "composite.h" | 24 | #include "composite.h" | ||
25 | #include "cursor.h" | 25 | #include "cursor.h" | ||
26 | #include "options.h" | 26 | #include "options.h" | ||
27 | #include "scene.h" | 27 | #include "platform.h" | ||
28 | #include "workspace.h" | 28 | #include "workspace.h" | ||
29 | 29 | | |||
30 | #include <KDecoration2/DecoratedClient> | 30 | #include <KDecoration2/DecoratedClient> | ||
31 | #include <KDecoration2/Decoration> | 31 | #include <KDecoration2/Decoration> | ||
32 | 32 | | |||
33 | #include <QDebug> | 33 | #include <QDebug> | ||
34 | 34 | | |||
35 | namespace KWin | 35 | namespace KWin | ||
▲ Show 20 Lines • Show All 249 Lines • ▼ Show 20 Line(s) | |||||
285 | 285 | | |||
286 | bool DecoratedClientImpl::isApplicationMenuActive() const | 286 | bool DecoratedClientImpl::isApplicationMenuActive() const | ||
287 | { | 287 | { | ||
288 | return m_client->applicationMenuActive(); | 288 | return m_client->applicationMenuActive(); | ||
289 | } | 289 | } | ||
290 | 290 | | |||
291 | void DecoratedClientImpl::createRenderer() | 291 | void DecoratedClientImpl::createRenderer() | ||
292 | { | 292 | { | ||
293 | if (Compositor::self()->hasScene()) { | 293 | m_renderer = kwinApp()->platform()->createDecorationRenderer(this); | ||
294 | m_renderer = Compositor::self()->scene()->createDecorationRenderer(this); | | |||
295 | } else { | | |||
296 | m_renderer = new X11Renderer(this); | | |||
297 | } | | |||
298 | } | 294 | } | ||
299 | 295 | | |||
300 | void DecoratedClientImpl::destroyRenderer() | 296 | void DecoratedClientImpl::destroyRenderer() | ||
301 | { | 297 | { | ||
302 | delete m_renderer; | 298 | delete m_renderer; | ||
303 | m_renderer = nullptr; | 299 | m_renderer = nullptr; | ||
304 | } | 300 | } | ||
305 | 301 | | |||
306 | } | 302 | } | ||
307 | } | 303 | } |