Changeset View
Changeset View
Standalone View
Standalone View
pointer_input.cpp
Show First 20 Lines • Show All 1300 Lines • ▼ Show 20 Line(s) | |||||
1301 | } | 1301 | } | ||
1302 | 1302 | | |||
1303 | template <typename T> | 1303 | template <typename T> | ||
1304 | void WaylandCursorImage::loadThemeCursor(const T &shape, QHash<T, Image> &cursors, Image *image) | 1304 | void WaylandCursorImage::loadThemeCursor(const T &shape, QHash<T, Image> &cursors, Image *image) | ||
1305 | { | 1305 | { | ||
1306 | auto it = cursors.constFind(shape); | 1306 | auto it = cursors.constFind(shape); | ||
1307 | if (it == cursors.constEnd()) { | 1307 | if (it == cursors.constEnd()) { | ||
1308 | loadThemeCursor(shape, image); | 1308 | loadThemeCursor(shape, image); | ||
1309 | it = cursors.insert(shape, *image); | 1309 | cursors.insert(shape, *image); | ||
1310 | } | 1310 | } else { | ||
1311 | *image = it.value(); | 1311 | *image = it.value(); | ||
1312 | } | 1312 | } | ||
1313 | } | ||||
1313 | 1314 | | |||
1314 | void CursorImage::reevaluteSource() | 1315 | void CursorImage::reevaluteSource() | ||
1315 | { | 1316 | { | ||
1316 | if (waylandServer()->seat()->isDragPointer()) { | 1317 | if (waylandServer()->seat()->isDragPointer()) { | ||
1317 | // TODO: touch drag? | 1318 | // TODO: touch drag? | ||
1318 | setSource(CursorSource::DragAndDrop); | 1319 | setSource(CursorSource::DragAndDrop); | ||
1319 | return; | 1320 | return; | ||
1320 | } | 1321 | } | ||
▲ Show 20 Lines • Show All 147 Lines • Show Last 20 Lines |