[xwl] Fix xcb to wayland clipboard

A seemingly unrelated change to cursors broke xwayland's clipboard
syncing, presumably because of a change in how startup is ordered with
regards to syncing between our internal wayland connection causing a
crash.

It was fixed with a flush, but ultimately guarding things coming up in
the natural order works better.

Long term plans are to finish removing the internal connection.

See xwayland_selections_test in autotests.
This commit is contained in:
David Edmundson 2020-06-29 15:06:33 +01:00
parent fdbca44d3e
commit 38691aa0e7

View file

@ -79,7 +79,6 @@ DataBridge::DataBridge(QObject *parent)
}
);
waylandServer()->internalClientConection()->flush();
waylandServer()->dispatch();
}
@ -97,10 +96,10 @@ void DataBridge::init()
bool DataBridge::filterEvent(xcb_generic_event_t *event)
{
if (m_clipboard->filterEvent(event)) {
if (m_clipboard && m_clipboard->filterEvent(event)) {
return true;
}
if (m_dnd->filterEvent(event)) {
if (m_dnd && m_dnd->filterEvent(event)) {
return true;
}
if (event->response_type - Xwayland::self()->xfixes()->first_event == XCB_XFIXES_SELECTION_NOTIFY) {