Fix clipboard from xwayland to wayland

master
emersion 7 years ago
parent 76dcb694c1
commit 810c4b119b
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48

@ -541,6 +541,9 @@ static void xwm_handle_selection_notify(struct wlr_xwm *xwm,
return; return;
} }
if (selection_notify->property == XCB_ATOM_NONE) {
wlr_log(L_ERROR, "convert selection failed");
} else if (selection_notify->target == xwm->atoms[TARGETS]) {
// No xwayland surface focused, deny access to clipboard // No xwayland surface focused, deny access to clipboard
if (xwm->focus_surface == NULL) { if (xwm->focus_surface == NULL) {
wlr_log(L_DEBUG, "denying write access to clipboard: " wlr_log(L_DEBUG, "denying write access to clipboard: "
@ -548,9 +551,7 @@ static void xwm_handle_selection_notify(struct wlr_xwm *xwm,
return; return;
} }
if (selection_notify->property == XCB_ATOM_NONE) { // This sets the Wayland clipboard (by calling wlr_seat_set_selection)
wlr_log(L_ERROR, "convert selection failed");
} else if (selection_notify->target == xwm->atoms[TARGETS]) {
xwm_get_selection_targets(xwm); xwm_get_selection_targets(xwm);
} else { } else {
xwm_get_selection_data(xwm); xwm_get_selection_data(xwm);

Loading…
Cancel
Save