mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-30 00:15:58 +01:00
Revert "xwm: only take clipboard if window is focused"
This reverts commit e3542d879d
.
This commit is contained in:
parent
35188834db
commit
52cda5653b
3 changed files with 6 additions and 20 deletions
|
@ -466,6 +466,7 @@ static int xwm_handle_xfixes_selection_notify(struct wlr_xwm *xwm,
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int xwm_handle_selection_event(struct wlr_xwm *xwm,
|
int xwm_handle_selection_event(struct wlr_xwm *xwm,
|
||||||
xcb_generic_event_t *event) {
|
xcb_generic_event_t *event) {
|
||||||
if (!xwm->seat) {
|
if (!xwm->seat) {
|
||||||
|
@ -541,25 +542,13 @@ 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;
|
||||||
}
|
|
||||||
|
|
||||||
xwm_set_selection_owner(xwm);
|
xcb_set_selection_owner(xwm->xcb_conn,
|
||||||
}
|
xwm->selection_window,
|
||||||
|
xwm->atoms[CLIPBOARD],
|
||||||
void xwm_set_selection_owner(struct wlr_xwm *xwm) {
|
XCB_TIME_CURRENT_TIME);
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void xwm_set_seat(struct wlr_xwm *xwm, struct wlr_seat *seat) {
|
void xwm_set_seat(struct wlr_xwm *xwm, struct wlr_seat *seat) {
|
||||||
|
|
|
@ -175,7 +175,6 @@ void xwm_surface_activate(struct wlr_xwm *xwm,
|
||||||
xwm_send_focus_window(xwm, xsurface);
|
xwm_send_focus_window(xwm, xsurface);
|
||||||
|
|
||||||
xwm->focus_surface = xsurface;
|
xwm->focus_surface = xsurface;
|
||||||
xwm_set_selection_owner(xwm);
|
|
||||||
|
|
||||||
xcb_flush(xwm->xcb_conn);
|
xcb_flush(xwm->xcb_conn);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
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_selection_init(struct wlr_xwm *xwm);
|
||||||
|
|
||||||
void xwm_set_seat(struct wlr_xwm *xwm, struct wlr_seat *seat);
|
void xwm_set_seat(struct wlr_xwm *xwm, struct wlr_seat *seat);
|
||||||
|
|
Loading…
Reference in a new issue