diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-12-08 09:23:26 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-12-08 09:23:26 -0500 |
commit | 52cda5653b52ff33f26b27fb2444c9895192d87e (patch) | |
tree | 32685bf8927a0102d24c03d18578a8cfd6557877 /xwayland | |
parent | 35188834db182db43b407b58db167950fab05477 (diff) |
Revert "xwm: only take clipboard if window is focused"
This reverts commit e3542d879d50d6239ad4ca24b4d30520fef40a87.
Diffstat (limited to 'xwayland')
-rw-r--r-- | xwayland/selection.c | 23 | ||||
-rw-r--r-- | xwayland/xwm.c | 1 | ||||
-rw-r--r-- | xwayland/xwm.h | 2 |
3 files changed, 6 insertions, 20 deletions
diff --git a/xwayland/selection.c b/xwayland/selection.c index 07d1d48f..3d57f394 100644 --- a/xwayland/selection.c +++ b/xwayland/selection.c @@ -466,6 +466,7 @@ static int xwm_handle_xfixes_selection_notify(struct wlr_xwm *xwm, return 1; } + int xwm_handle_selection_event(struct wlr_xwm *xwm, xcb_generic_event_t *event) { if (!xwm->seat) { @@ -541,25 +542,13 @@ static void handle_seat_set_selection(struct wl_listener *listener, return; } - if (source->send == data_source_send) { + if (source->send == data_source_send) return; - } - - xwm_set_selection_owner(xwm); -} -void xwm_set_selection_owner(struct wlr_xwm *xwm) { - if (xwm->focus_surface && xwm->seat->selection_source) { - xcb_set_selection_owner(xwm->xcb_conn, - xwm->selection_window, - xwm->atoms[CLIPBOARD], - XCB_TIME_CURRENT_TIME); - } else { - xcb_set_selection_owner(xwm->xcb_conn, - XCB_ATOM_NONE, - xwm->atoms[CLIPBOARD], - xwm->selection_timestamp); - } + xcb_set_selection_owner(xwm->xcb_conn, + xwm->selection_window, + xwm->atoms[CLIPBOARD], + XCB_TIME_CURRENT_TIME); } void xwm_set_seat(struct wlr_xwm *xwm, struct wlr_seat *seat) { diff --git a/xwayland/xwm.c b/xwayland/xwm.c index a93f3525..f1add638 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -175,7 +175,6 @@ void xwm_surface_activate(struct wlr_xwm *xwm, xwm_send_focus_window(xwm, xsurface); xwm->focus_surface = xsurface; - xwm_set_selection_owner(xwm); xcb_flush(xwm->xcb_conn); } diff --git a/xwayland/xwm.h b/xwayland/xwm.h index ad8bf9d5..47e674c0 100644 --- a/xwayland/xwm.h +++ b/xwayland/xwm.h @@ -98,8 +98,6 @@ void xwm_set_cursor(struct wlr_xwm *xwm, const uint8_t *pixels, uint32_t stride, int xwm_handle_selection_event(struct wlr_xwm *xwm, xcb_generic_event_t *event); -void xwm_set_selection_owner(struct wlr_xwm *xwm); - void xwm_selection_init(struct wlr_xwm *xwm); void xwm_set_seat(struct wlr_xwm *xwm, struct wlr_seat *seat); |