Changeset View
Changeset View
Standalone View
Standalone View
plugins/scenes/qpainter/scene_qpainter.cpp
Show All 23 Lines | |||||
24 | #include "cursor.h" | 24 | #include "cursor.h" | ||
25 | #include "deleted.h" | 25 | #include "deleted.h" | ||
26 | #include "effects.h" | 26 | #include "effects.h" | ||
27 | #include "main.h" | 27 | #include "main.h" | ||
28 | #include "screens.h" | 28 | #include "screens.h" | ||
29 | #include "toplevel.h" | 29 | #include "toplevel.h" | ||
30 | #include "platform.h" | 30 | #include "platform.h" | ||
31 | #include "wayland_server.h" | 31 | #include "wayland_server.h" | ||
32 | | ||||
33 | #include <kwineffectquickview.h> | ||||
34 | | ||||
32 | #include <KWayland/Server/buffer_interface.h> | 35 | #include <KWayland/Server/buffer_interface.h> | ||
33 | #include <KWayland/Server/subcompositor_interface.h> | 36 | #include <KWayland/Server/subcompositor_interface.h> | ||
34 | #include <KWayland/Server/surface_interface.h> | 37 | #include <KWayland/Server/surface_interface.h> | ||
35 | #include "decorations/decoratedclient.h" | 38 | #include "decorations/decoratedclient.h" | ||
36 | // Qt | 39 | // Qt | ||
37 | #include <QDebug> | 40 | #include <QDebug> | ||
38 | #include <QPainter> | 41 | #include <QPainter> | ||
39 | #include <KDecoration2/Decoration> | 42 | #include <KDecoration2/Decoration> | ||
▲ Show 20 Lines • Show All 128 Lines • ▼ Show 20 Line(s) | 170 | if (img.isNull()) { | |||
168 | return; | 171 | return; | ||
169 | } | 172 | } | ||
170 | const QPoint cursorPos = Cursor::pos(); | 173 | const QPoint cursorPos = Cursor::pos(); | ||
171 | const QPoint hotspot = kwinApp()->platform()->softwareCursorHotspot(); | 174 | const QPoint hotspot = kwinApp()->platform()->softwareCursorHotspot(); | ||
172 | m_painter->drawImage(cursorPos - hotspot, img); | 175 | m_painter->drawImage(cursorPos - hotspot, img); | ||
173 | kwinApp()->platform()->markCursorAsRendered(); | 176 | kwinApp()->platform()->markCursorAsRendered(); | ||
174 | } | 177 | } | ||
175 | 178 | | |||
179 | void SceneQPainter::paintEffectQuickView(EffectQuickView *w) | ||||
180 | { | ||||
181 | QPainter *painter = effects->scenePainter(); | ||||
182 | const QImage buffer = w->bufferAsImage(); | ||||
183 | if (buffer.isNull()) { | ||||
184 | return; | ||||
185 | } | ||||
186 | painter->drawImage(w->geometry(), buffer); | ||||
187 | } | ||||
188 | | ||||
176 | Scene::Window *SceneQPainter::createWindow(Toplevel *toplevel) | 189 | Scene::Window *SceneQPainter::createWindow(Toplevel *toplevel) | ||
177 | { | 190 | { | ||
178 | return new SceneQPainter::Window(this, toplevel); | 191 | return new SceneQPainter::Window(this, toplevel); | ||
179 | } | 192 | } | ||
180 | 193 | | |||
181 | Scene::EffectFrame *SceneQPainter::createEffectFrame(EffectFrameImpl *frame) | 194 | Scene::EffectFrame *SceneQPainter::createEffectFrame(EffectFrameImpl *frame) | ||
182 | { | 195 | { | ||
183 | return new QPainterEffectFrame(frame, this); | 196 | return new QPainterEffectFrame(frame, this); | ||
▲ Show 20 Lines • Show All 705 Lines • Show Last 20 Lines |