Changeset View
Changeset View
Standalone View
Standalone View
src/client/connection_thread.cpp
Show First 20 Lines • Show All 234 Lines • ▼ Show 20 Line(s) | 231 | { | |||
---|---|---|---|---|---|
235 | wl_display_flush(d->display); | 235 | wl_display_flush(d->display); | ||
236 | } | 236 | } | ||
237 | 237 | | |||
238 | void ConnectionThread::roundtrip() | 238 | void ConnectionThread::roundtrip() | ||
239 | { | 239 | { | ||
240 | if (!d->display) { | 240 | if (!d->display) { | ||
241 | return; | 241 | return; | ||
242 | } | 242 | } | ||
243 | if (d->foreign) { | ||||
244 | // try to perform roundtrip through the QPA plugin if it's supported | ||||
245 | if (QPlatformNativeInterface *native = qApp->platformNativeInterface()) { | ||||
246 | // in case the platform provides a dedicated roundtrip function use that install of wl_display_roundtrip | ||||
247 | QFunctionPointer roundtripFunction = native->platformFunction(QByteArrayLiteral("roundtrip")); | ||||
248 | if (roundtripFunction) { | ||||
249 | roundtripFunction(); | ||||
250 | return; | ||||
251 | } | ||||
252 | } | ||||
253 | } | ||||
243 | wl_display_roundtrip(d->display); | 254 | wl_display_roundtrip(d->display); | ||
244 | } | 255 | } | ||
245 | 256 | | |||
246 | } | 257 | } | ||
247 | } | 258 | } |