Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/x11/standalone/x11_platform.cpp
Show First 20 Lines • Show All 309 Lines • ▼ Show 20 Line(s) | 302 | { | |||
---|---|---|---|---|---|
310 | }); | 310 | }); | ||
311 | } | 311 | } | ||
312 | 312 | | |||
313 | OverlayWindow *X11StandalonePlatform::createOverlayWindow() | 313 | OverlayWindow *X11StandalonePlatform::createOverlayWindow() | ||
314 | { | 314 | { | ||
315 | return new OverlayWindowX11(); | 315 | return new OverlayWindowX11(); | ||
316 | } | 316 | } | ||
317 | 317 | | |||
318 | /* | ||||
319 | Updates xTime(). This used to simply fetch current timestamp from the server, | ||||
320 | but that can cause xTime() to be newer than timestamp of events that are | ||||
321 | still in our events queue, thus e.g. making XSetInputFocus() caused by such | ||||
322 | event to be ignored. Therefore events queue is searched for first | ||||
323 | event with timestamp, and extra PropertyNotify is generated in order to make | ||||
324 | sure such event is found. | ||||
325 | */ | ||||
326 | void X11StandalonePlatform::updateXTime() | ||||
327 | { | ||||
328 | // NOTE: QX11Info::getTimestamp does not yet search the event queue as the old | ||||
329 | // solution did. This means there might be regressions currently. See the | ||||
330 | // documentation above on how it should be done properly. | ||||
331 | kwinApp()->setX11Time(QX11Info::getTimestamp(), Application::TimestampUpdate::Always); | ||||
332 | } | ||||
333 | | ||||
334 | | ||||
318 | } | 335 | } |