mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-26 14:45:58 +01:00
Fix wlr_data_device_manager
This commit is contained in:
parent
154d2ad941
commit
f2a9098691
3 changed files with 12 additions and 11 deletions
|
@ -133,8 +133,9 @@ static void handle_keyboard_bound(struct wl_listener *listener, void *data) {
|
||||||
wl_keyboard_send_keymap(handle->keyboard, WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1,
|
wl_keyboard_send_keymap(handle->keyboard, WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1,
|
||||||
state->keymap_fd, state->keymap_size);
|
state->keymap_fd, state->keymap_size);
|
||||||
|
|
||||||
if (wl_resource_get_version(handle->keyboard) >= 2)
|
if (wl_resource_get_version(handle->keyboard) >= 2) {
|
||||||
wl_keyboard_send_repeat_info(handle->keyboard, 660, 25);
|
wl_keyboard_send_repeat_info(handle->keyboard, 25, 600);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
|
|
|
@ -157,17 +157,11 @@ struct wlr_data_device_manager *wlr_data_device_manager_create(struct wl_display
|
||||||
}
|
}
|
||||||
|
|
||||||
void wlr_data_device_manager_destroy(struct wlr_data_device_manager *manager) {
|
void wlr_data_device_manager_destroy(struct wlr_data_device_manager *manager) {
|
||||||
if (!manager) {
|
if (manager) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: destroy remaining resources? cancel current selection?
|
|
||||||
// if this is called why there are still resources active we will
|
|
||||||
// always get problems
|
|
||||||
|
|
||||||
wl_global_destroy(manager->global);
|
wl_global_destroy(manager->global);
|
||||||
free(manager);
|
free(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) {
|
||||||
|
|
|
@ -180,7 +180,13 @@ void wlr_seat_destroy(struct wlr_seat *wlr_seat) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct wlr_seat_handle *handle;
|
||||||
|
wl_list_for_each(handle, &wlr_seat->handles, link) {
|
||||||
|
wl_resource_destroy(handle->wl_resource); // will destroy other resources as well
|
||||||
|
}
|
||||||
|
|
||||||
wl_global_destroy(wlr_seat->wl_global);
|
wl_global_destroy(wlr_seat->wl_global);
|
||||||
|
free(wlr_seat->data_device);
|
||||||
free(wlr_seat->name);
|
free(wlr_seat->name);
|
||||||
free(wlr_seat);
|
free(wlr_seat);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue