selection fixes

master
Tony Crisci 7 years ago
parent 52cda5653b
commit a4bb0574c4

@ -434,7 +434,8 @@ static int xwm_handle_xfixes_selection_notify(struct wlr_xwm *xwm,
if (xwm->selection_owner != xwm->selection_window) { if (xwm->selection_owner != xwm->selection_window) {
// A real X client selection went away, not our // A real X client selection went away, not our
// proxy selection // proxy selection
// TODO: Clear the wayland selection (or not)? wlr_seat_set_selection(xwm->seat, NULL,
wl_display_next_serial(xwm->xwayland->wl_display));
} }
xwm->selection_owner = XCB_WINDOW_NONE; xwm->selection_owner = XCB_WINDOW_NONE;
@ -442,6 +443,8 @@ static int xwm_handle_xfixes_selection_notify(struct wlr_xwm *xwm,
return 1; return 1;
} }
xwm->selection_owner = xfixes_selection_notify->owner;
// We have to use XCB_TIME_CURRENT_TIME when we claim the // We have to use XCB_TIME_CURRENT_TIME when we claim the
// selection, so grab the actual timestamp here so we can // selection, so grab the actual timestamp here so we can
// answer TIMESTAMP conversion requests correctly. // answer TIMESTAMP conversion requests correctly.
@ -451,8 +454,6 @@ static int xwm_handle_xfixes_selection_notify(struct wlr_xwm *xwm,
return 1; return 1;
} }
xwm->selection_owner = xfixes_selection_notify->owner;
xwm->incr = 0; xwm->incr = 0;
// doing this will give a selection notify where we actually handle the sync // doing this will give a selection notify where we actually handle the sync
xcb_convert_selection(xwm->xcb_conn, xwm->selection_window, xcb_convert_selection(xwm->xcb_conn, xwm->selection_window,
@ -542,8 +543,9 @@ static void handle_seat_set_selection(struct wl_listener *listener,
return; return;
} }
if (source->send == data_source_send) if (source->send == data_source_send) {
return; return;
}
xcb_set_selection_owner(xwm->xcb_conn, xcb_set_selection_owner(xwm->xcb_conn,
xwm->selection_window, xwm->selection_window,

Loading…
Cancel
Save