Changeset View
Changeset View
Standalone View
Standalone View
plugins/scenes/qpainter/scene_qpainter.cpp
Show First 20 Lines • Show All 161 Lines • ▼ Show 20 Line(s) | 158 | { | |||
---|---|---|---|---|---|
162 | } | 162 | } | ||
163 | } | 163 | } | ||
164 | 164 | | |||
165 | void SceneQPainter::paintCursor() | 165 | void SceneQPainter::paintCursor() | ||
166 | { | 166 | { | ||
167 | if (!kwinApp()->platform()->usesSoftwareCursor()) { | 167 | if (!kwinApp()->platform()->usesSoftwareCursor()) { | ||
168 | return; | 168 | return; | ||
169 | } | 169 | } | ||
170 | const QImage img = kwinApp()->platform()->softwareCursor(); | 170 | | ||
171 | Cursor* cursor = Cursors::self()->currentCursor(); | ||||
172 | const QImage img = cursor->image(); | ||||
171 | if (img.isNull()) { | 173 | if (img.isNull()) { | ||
172 | return; | 174 | return; | ||
173 | } | 175 | } | ||
174 | const QPoint cursorPos = Cursor::pos(); | 176 | const QPoint cursorPos = cursor->pos(); | ||
175 | const QPoint hotspot = kwinApp()->platform()->softwareCursorHotspot(); | 177 | const QPoint hotspot = cursor->hotspot(); | ||
176 | m_painter->drawImage(cursorPos - hotspot, img); | 178 | m_painter->drawImage(cursorPos - hotspot, img); | ||
177 | kwinApp()->platform()->markCursorAsRendered(); | 179 | cursor->markAsRendered(); | ||
178 | } | 180 | } | ||
179 | 181 | | |||
180 | void SceneQPainter::paintEffectQuickView(EffectQuickView *w) | 182 | void SceneQPainter::paintEffectQuickView(EffectQuickView *w) | ||
181 | { | 183 | { | ||
182 | QPainter *painter = effects->scenePainter(); | 184 | QPainter *painter = effects->scenePainter(); | ||
183 | const QImage buffer = w->bufferAsImage(); | 185 | const QImage buffer = w->bufferAsImage(); | ||
184 | if (buffer.isNull()) { | 186 | if (buffer.isNull()) { | ||
185 | return; | 187 | return; | ||
▲ Show 20 Lines • Show All 733 Lines • Show Last 20 Lines |