Changeset View
Changeset View
Standalone View
Standalone View
main.cpp
Show First 20 Lines • Show All 359 Lines • ▼ Show 20 Line(s) | 327 | { | |||
---|---|---|---|---|---|
360 | case XCB_CONFIGURE_REQUEST: | 360 | case XCB_CONFIGURE_REQUEST: | ||
361 | case XCB_GRAVITY_NOTIFY: | 361 | case XCB_GRAVITY_NOTIFY: | ||
362 | case XCB_RESIZE_REQUEST: | 362 | case XCB_RESIZE_REQUEST: | ||
363 | case XCB_CIRCULATE_NOTIFY: | 363 | case XCB_CIRCULATE_NOTIFY: | ||
364 | case XCB_CIRCULATE_REQUEST: | 364 | case XCB_CIRCULATE_REQUEST: | ||
365 | // no timestamp | 365 | // no timestamp | ||
366 | return; | 366 | return; | ||
367 | case XCB_PROPERTY_NOTIFY: | 367 | case XCB_PROPERTY_NOTIFY: | ||
368 | time = reinterpret_cast<xcb_property_notify_event_t*>(event)->time; | 368 | { | ||
369 | xcb_property_notify_event_t *propertyNotify = reinterpret_cast<xcb_property_notify_event_t*>(event); | ||||
370 | time = propertyNotify->time; | ||||
371 | | ||||
372 | // updateXTime handling see also Platform::updateXTime | ||||
373 | if (kwinApp()->m_updatingXTimer && propertyNotify->window == m_rootWindow | ||||
374 | && propertyNotify->atom == atoms->clipboard | ||||
375 | ) { | ||||
376 | // this event was sent by Platform::updateXTime | ||||
377 | // to forcefully update the timestamp at the expected point in time | ||||
378 | // inspired by https://code.woboq.org/qt5/qtbase/src/plugins/platforms/xcb/qxcbconnection.h.html#QXcbConnection QXcbConnection::getTimestamp() | ||||
zzag: It would be nice to have a comment that explains what is going on here. | |||||
379 | kwinApp()->setX11Time(time, Application::TimestampUpdate::Always); | ||||
380 | xcb_delete_property(connection(), m_rootWindow, atoms->clipboard); | ||||
381 | m_updatingXTimer = false; | ||||
382 | } | ||||
383 | } | ||||
369 | break; | 384 | break; | ||
370 | case XCB_SELECTION_CLEAR: | 385 | case XCB_SELECTION_CLEAR: | ||
371 | time = reinterpret_cast<xcb_selection_clear_event_t*>(event)->time; | 386 | time = reinterpret_cast<xcb_selection_clear_event_t*>(event)->time; | ||
372 | break; | 387 | break; | ||
373 | case XCB_SELECTION_REQUEST: | 388 | case XCB_SELECTION_REQUEST: | ||
374 | time = reinterpret_cast<xcb_selection_request_event_t*>(event)->time; | 389 | time = reinterpret_cast<xcb_selection_request_event_t*>(event)->time; | ||
375 | break; | 390 | break; | ||
376 | case XCB_SELECTION_NOTIFY: | 391 | case XCB_SELECTION_NOTIFY: | ||
▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines |
It would be nice to have a comment that explains what is going on here.