Changeset View
Changeset View
Standalone View
Standalone View
xwl/drag_x.cpp
Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Line(s) | |||||
63 | } | 63 | } | ||
64 | 64 | | |||
65 | XToWlDrag::XToWlDrag(X11Source *source) | 65 | XToWlDrag::XToWlDrag(X11Source *source) | ||
66 | : m_source(source) | 66 | : m_source(source) | ||
67 | { | 67 | { | ||
68 | connect(DataBridge::self()->dnd(), &Dnd::transferFinished, this, [this](xcb_timestamp_t eventTime) { | 68 | connect(DataBridge::self()->dnd(), &Dnd::transferFinished, this, [this](xcb_timestamp_t eventTime) { | ||
69 | // we use this mechanism, because the finished call is not | 69 | // we use this mechanism, because the finished call is not | ||
70 | // reliable done by Wayland clients | 70 | // reliable done by Wayland clients | ||
71 | auto it = std::find_if(m_dataRequests.begin(), m_dataRequests.end(), [this, eventTime](QPair<xcb_timestamp_t, bool> req) { | 71 | auto it = std::find_if(m_dataRequests.begin(), m_dataRequests.end(), [eventTime](const QPair<xcb_timestamp_t, bool> &req) { | ||
72 | return req.first == eventTime; | 72 | return req.first == eventTime; | ||
73 | }); | 73 | }); | ||
74 | if (it == m_dataRequests.end()) { | 74 | if (it == m_dataRequests.end()) { | ||
75 | // transfer finished for a different drag | 75 | // transfer finished for a different drag | ||
76 | return; | 76 | return; | ||
77 | } | 77 | } | ||
78 | Q_ASSERT(!(*it).second); | 78 | Q_ASSERT(!(*it).second); | ||
79 | (*it).second = true; | 79 | (*it).second = true; | ||
▲ Show 20 Lines • Show All 471 Lines • Show Last 20 Lines |