aboutsummaryrefslogtreecommitdiff
path: root/xwayland
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-12-08 09:46:50 -0500
committerTony Crisci <tony@dubstepdish.com>2017-12-08 09:46:50 -0500
commita4bb0574c46ab2364abcee75b597adf7c52c076e (patch)
tree6fd5b5e30e8d188ac3b893f315102c404ee1f52c /xwayland
parent52cda5653b52ff33f26b27fb2444c9895192d87e (diff)
selection fixes
Diffstat (limited to 'xwayland')
-rw-r--r--xwayland/selection.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/xwayland/selection.c b/xwayland/selection.c
index 3d57f394..fe4132ac 100644
--- a/xwayland/selection.c
+++ b/xwayland/selection.c
@@ -434,7 +434,8 @@ static int xwm_handle_xfixes_selection_notify(struct wlr_xwm *xwm,
if (xwm->selection_owner != xwm->selection_window) {
// A real X client selection went away, not our
// 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;
@@ -442,6 +443,8 @@ static int xwm_handle_xfixes_selection_notify(struct wlr_xwm *xwm,
return 1;
}
+ xwm->selection_owner = xfixes_selection_notify->owner;
+
// We have to use XCB_TIME_CURRENT_TIME when we claim the
// selection, so grab the actual timestamp here so we can
// answer TIMESTAMP conversion requests correctly.
@@ -451,8 +454,6 @@ static int xwm_handle_xfixes_selection_notify(struct wlr_xwm *xwm,
return 1;
}
- xwm->selection_owner = xfixes_selection_notify->owner;
-
xwm->incr = 0;
// doing this will give a selection notify where we actually handle the sync
xcb_convert_selection(xwm->xcb_conn, xwm->selection_window,
@@ -542,8 +543,9 @@ static void handle_seat_set_selection(struct wl_listener *listener,
return;
}
- if (source->send == data_source_send)
+ if (source->send == data_source_send) {
return;
+ }
xcb_set_selection_owner(xwm->xcb_conn,
xwm->selection_window,