mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-02 11:55:59 +01:00
data-device: handle multiple data devices
This commit is contained in:
parent
b8de0a29b4
commit
c0e8585a4c
1 changed files with 6 additions and 2 deletions
|
@ -652,8 +652,12 @@ void data_device_manager_get_data_device(struct wl_client *client,
|
|||
return;
|
||||
}
|
||||
|
||||
// TODO handle a seat handle having multiple data devices
|
||||
assert(handle->data_device == NULL);
|
||||
if (handle->data_device != NULL) {
|
||||
// XXX this is probably a protocol violation, but it simplfies our code
|
||||
// and it's stupid to create several data devices for the same seat.
|
||||
wl_resource_destroy(handle->data_device);
|
||||
}
|
||||
|
||||
handle->data_device = resource;
|
||||
|
||||
wl_resource_set_implementation(resource, &data_device_impl,
|
||||
|
|
Loading…
Reference in a new issue