Changeset View
Changeset View
Standalone View
Standalone View
shadow.cpp
Show All 25 Lines | |||||
26 | #include "effects.h" | 26 | #include "effects.h" | ||
27 | #include "internal_client.h" | 27 | #include "internal_client.h" | ||
28 | #include "toplevel.h" | 28 | #include "toplevel.h" | ||
29 | #include "wayland_server.h" | 29 | #include "wayland_server.h" | ||
30 | 30 | | |||
31 | #include <KDecoration2/Decoration> | 31 | #include <KDecoration2/Decoration> | ||
32 | #include <KDecoration2/DecorationShadow> | 32 | #include <KDecoration2/DecorationShadow> | ||
33 | 33 | | |||
34 | #include <KWayland/Server/buffer_interface.h> | 34 | #include <KWaylandServer/buffer_interface.h> | ||
35 | #include <KWayland/Server/shadow_interface.h> | 35 | #include <KWaylandServer/shadow_interface.h> | ||
36 | #include <KWayland/Server/surface_interface.h> | 36 | #include <KWaylandServer/surface_interface.h> | ||
37 | 37 | | |||
38 | #include <QWindow> | 38 | #include <QWindow> | ||
39 | 39 | | |||
40 | Q_DECLARE_METATYPE(QMargins) | 40 | Q_DECLARE_METATYPE(QMargins) | ||
41 | 41 | | |||
42 | namespace KWin | 42 | namespace KWin | ||
43 | { | 43 | { | ||
44 | 44 | | |||
▲ Show 20 Lines • Show All 189 Lines • ▼ Show 20 Line(s) | 213 | { | |||
234 | updateShadowRegion(); | 234 | updateShadowRegion(); | ||
235 | if (!prepareBackend()) { | 235 | if (!prepareBackend()) { | ||
236 | return false; | 236 | return false; | ||
237 | } | 237 | } | ||
238 | buildQuads(); | 238 | buildQuads(); | ||
239 | return true; | 239 | return true; | ||
240 | } | 240 | } | ||
241 | 241 | | |||
242 | bool Shadow::init(const QPointer< KWayland::Server::ShadowInterface > &shadow) | 242 | bool Shadow::init(const QPointer< KWaylandServer::ShadowInterface > &shadow) | ||
243 | { | 243 | { | ||
244 | if (!shadow) { | 244 | if (!shadow) { | ||
245 | return false; | 245 | return false; | ||
246 | } | 246 | } | ||
247 | 247 | | |||
248 | m_shadowElements[ShadowElementTop] = shadow->top() ? QPixmap::fromImage(shadow->top()->data().copy()) : QPixmap(); | 248 | m_shadowElements[ShadowElementTop] = shadow->top() ? QPixmap::fromImage(shadow->top()->data().copy()) : QPixmap(); | ||
249 | m_shadowElements[ShadowElementTopRight] = shadow->topRight() ? QPixmap::fromImage(shadow->topRight()->data().copy()) : QPixmap(); | 249 | m_shadowElements[ShadowElementTopRight] = shadow->topRight() ? QPixmap::fromImage(shadow->topRight()->data().copy()) : QPixmap(); | ||
250 | m_shadowElements[ShadowElementRight] = shadow->right() ? QPixmap::fromImage(shadow->right()->data().copy()) : QPixmap(); | 250 | m_shadowElements[ShadowElementRight] = shadow->right() ? QPixmap::fromImage(shadow->right()->data().copy()) : QPixmap(); | ||
▲ Show 20 Lines • Show All 251 Lines • Show Last 20 Lines |