History

gui-wl: correct seat binding to work with KDE (thanks Keegan)

Jacob Moody committed 3 years ago

Commit 8bf59cf1 parent 05c9c551 file · +6 −3Browse files

Unified · Split

gui-wl/wl-cb.c+6−3
@@ -676,9 +676,6 @@ handle_global(void *data, struct wl_registry *registry, uint32_t name, const cha · 675 unmodified lines
676 return;676 return;
677 wl->seat = wl_registry_bind(registry, name, &wl_seat_interface, 4);677 wl->seat = wl_registry_bind(registry, name, &wl_seat_interface, 4);
678 wl_seat_add_listener(wl->seat, &seat_listener, wl);678 wl_seat_add_listener(wl->seat, &seat_listener, wl);
679 wl->data_device = wl_data_device_manager_get_data_device(wl->data_device_manager, wl->seat);
680 wl_data_device_add_listener(wl->data_device, &data_device_listener, wl);
681 wl->primsel_device = zwp_primary_selection_device_manager_v1_get_device(wl->primsel, wl->seat);
682 } else if(strcmp(interface, wl_compositor_interface.name) == 0) {679 } else if(strcmp(interface, wl_compositor_interface.name) == 0) {
683 wl->compositor = wl_registry_bind(registry, name, &wl_compositor_interface, 1);680 wl->compositor = wl_registry_bind(registry, name, &wl_compositor_interface, 1);
684 } else if(strcmp(interface, xdg_wm_base_interface.name) == 0) {681 } else if(strcmp(interface, xdg_wm_base_interface.name) == 0) {
@@ -750,6 +747,12 @@ wlsetcb(Wlwin *wl) · 65 unmodified lines
750 747
751 cb = wl_surface_frame(wl->surface);748 cb = wl_surface_frame(wl->surface);
752 wl_callback_add_listener(cb, &wl_surface_frame_listener, wl);749 wl_callback_add_listener(cb, &wl_surface_frame_listener, wl);
750
751 if(wl->data_device_manager != nil && wl->seat != nil){
752 wl->data_device = wl_data_device_manager_get_data_device(wl->data_device_manager, wl->seat);
753 wl_data_device_add_listener(wl->data_device, &data_device_listener, wl);
754 wl->primsel_device = zwp_primary_selection_device_manager_v1_get_device(wl->primsel, wl->seat);
755 }
753}756}
754 757
755void758void

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t