Commit 97f4599a authored by David Edmundson's avatar David Edmundson

[klipper] Check version before calling v2 DataDevice methods

Calling a V2 method when our proxy is just at V1 is a fatal error.

This wasn't guarded. V2 isn't implemented fully anyway.

BUG: 424709
parent 59615cff
......@@ -312,7 +312,10 @@ void WaylandClipboard::clear(QClipboard::Mode mode)
if (mode == QClipboard::Clipboard) {
m_device->set_selection(nullptr);
} else if (mode == QClipboard::Selection) {
m_device->set_primary_selection(nullptr);
if (zwlr_data_control_device_v1_get_version(m_device->object()) >=
ZWLR_DATA_CONTROL_DEVICE_V1_SET_PRIMARY_SELECTION_SINCE_VERSION) {
m_device->set_primary_selection(nullptr);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment