mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-23 05:15:58 +01:00
bug: fix clipboard
This commit is contained in:
parent
d61621e2fa
commit
51de398885
1 changed files with 8 additions and 0 deletions
|
@ -33,6 +33,10 @@ static void data_device_start_drag(struct wl_client *client,
|
||||||
static void data_device_set_selection(struct wl_client *client,
|
static void data_device_set_selection(struct wl_client *client,
|
||||||
struct wl_resource *resource, struct wl_resource *source_resource,
|
struct wl_resource *resource, struct wl_resource *source_resource,
|
||||||
uint32_t serial) {
|
uint32_t serial) {
|
||||||
|
if (!source_resource) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: serial validation
|
// TODO: serial validation
|
||||||
struct wlr_seat_handle *handle = wl_resource_get_user_data(resource);
|
struct wlr_seat_handle *handle = wl_resource_get_user_data(resource);
|
||||||
struct wlr_data_device *device = handle->wlr_seat->data_device;
|
struct wlr_data_device *device = handle->wlr_seat->data_device;
|
||||||
|
@ -176,6 +180,10 @@ void wlr_data_device_manager_destroy(struct wlr_data_device_manager *manager) {
|
||||||
|
|
||||||
void wlr_data_device_set_selection(struct wlr_data_device *device,
|
void wlr_data_device_set_selection(struct wlr_data_device *device,
|
||||||
struct wlr_data_source *source) {
|
struct wlr_data_source *source) {
|
||||||
|
if (device->selection == source) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (device->selection) {
|
if (device->selection) {
|
||||||
wl_list_remove(&device->selection_destroyed.link);
|
wl_list_remove(&device->selection_destroyed.link);
|
||||||
wlr_data_source_cancelled(device->selection);
|
wlr_data_source_cancelled(device->selection);
|
||||||
|
|
Loading…
Reference in a new issue