cage: add data device manager

This protocol is required by at least GTK applications to receive mouse
input.
This commit is contained in:
Jente Hidskes 2020-10-18 18:48:36 +02:00
parent 21a8539399
commit 4c22c9494b
No known key found for this signature in database
GPG key ID: 04BE5A29F32D91EA

View file

@ -22,6 +22,7 @@
#include <wlr/render/wlr_renderer.h>
#include <wlr/types/wlr_compositor.h>
#include <wlr/types/wlr_cursor.h>
#include <wlr/types/wlr_data_device.h>
#include <wlr/types/wlr_seat.h>
#include <wlr/types/wlr_xcursor_manager.h>
#include <wlr/types/wlr_xdg_shell.h>
@ -385,6 +386,7 @@ main(int argc, char *argv[])
struct wlr_renderer *renderer = NULL;
struct wlr_compositor *compositor = NULL;
struct wlr_xdg_shell *xdg_shell = NULL;
struct wlr_data_device_manager *data_device_manager = NULL;
pid_t pid = 0;
int ret = 0;
@ -443,6 +445,13 @@ main(int argc, char *argv[])
goto end;
}
data_device_manager = wlr_data_device_manager_create(server.wl_display);
if (!data_device_manager) {
wlr_log(WLR_ERROR, "Unable to create the data device manager");
ret = 1;
goto end;
}
wl_list_init(&server.outputs);
server.new_output.notify = handle_new_output;
wl_signal_add(&backend->events.new_output, &server.new_output);