xwm: always sync clipboard from xwl.

Some app (or scripts) use x11 clipboard only, but it may run in wayland window (like terminal and electron apps). We should set the wayland clipboard so that these apps can work properly.
This commit is contained in:
Dreamail 2025-06-13 11:38:24 +08:00 committed by GitHub
parent d14f81e6ac
commit 104493dfb4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -610,11 +610,6 @@ void CXWM::handleSelectionNotify(xcb_selection_notify_event_t* e) {
sel->transfers.erase(it); sel->transfers.erase(it);
} }
} else if (e->target == HYPRATOMS["TARGETS"]) { } else if (e->target == HYPRATOMS["TARGETS"]) {
if (!m_focusedSurface) {
Debug::log(TRACE, "[xwm] denying access to write to clipboard because no X client is in focus");
return;
}
setClipboardToWayland(*sel); setClipboardToWayland(*sel);
} else if (!sel->transfers.empty()) } else if (!sel->transfers.empty())
getTransferData(*sel); getTransferData(*sel);