diff options
-rw-r--r-- | tinywl/README.md | 2 | ||||
-rw-r--r-- | types/wlr_data_control_v1.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/tinywl/README.md b/tinywl/README.md index caacc412..e0385d24 100644 --- a/tinywl/README.md +++ b/tinywl/README.md @@ -8,7 +8,7 @@ based on wlroots. ## Building TinyWL -TinyWL is disconencted from the main wlroots build system, in order to make it +TinyWL is disconnected from the main wlroots build system, in order to make it easier to understand the build requirements for your own Wayland compositors. Simply install the dependencies: diff --git a/types/wlr_data_control_v1.c b/types/wlr_data_control_v1.c index e06b9e63..5bb7e81c 100644 --- a/types/wlr_data_control_v1.c +++ b/types/wlr_data_control_v1.c @@ -177,11 +177,15 @@ static void control_handle_set_selection(struct wl_client *client, struct wl_resource *source_resource) { struct wlr_data_control_device_v1 *device = control_from_resource(control_resource); - struct client_data_source *source = source_from_resource(source_resource); if (device == NULL) { return; } + struct client_data_source *source = NULL; + if (source_resource != NULL) { + source = source_from_resource(source_resource); + } + struct wlr_data_source *wlr_source = source ? &source->source : NULL; wlr_seat_request_set_selection(device->seat, wlr_source, wl_display_next_serial(device->seat->display)); |