Fixed changes introduced with wlroots version 0.10.0 (#17)

The variable layer in struct wlr_layer_surface_v1 is moved to wlr_layer_surface_v1_state
This commit is contained in:
Hardy7cc 2020-01-28 17:50:17 +01:00 committed by Charlotte Meyer
parent 6ad6e04bb8
commit f9bf9f9c79

View file

@ -361,9 +361,9 @@ layer_shell_new_surface_notify(struct wl_listener *listener, void *data)
struct kiwmi_output *output = layer_surface->output->data; struct kiwmi_output *output = layer_surface->output->data;
size_t len = sizeof(output->layers) / sizeof(output->layers[0]); size_t len = sizeof(output->layers) / sizeof(output->layers[0]);
if (layer_surface->layer >= len) { if (layer_surface->current.layer >= len) {
wlr_log( wlr_log(
WLR_ERROR, "Bad layer surface layer '%d'", layer_surface->layer); WLR_ERROR, "Bad layer surface layer '%d'", layer_surface->current.layer);
wlr_layer_surface_v1_close(layer_surface); wlr_layer_surface_v1_close(layer_surface);
free(layer); free(layer);
return; return;
@ -378,7 +378,7 @@ layer_shell_new_surface_notify(struct wl_listener *listener, void *data)
layer->commit.notify = kiwmi_layer_commit_notify; layer->commit.notify = kiwmi_layer_commit_notify;
wl_signal_add(&layer_surface->surface->events.commit, &layer->commit); wl_signal_add(&layer_surface->surface->events.commit, &layer->commit);
wl_list_insert(&output->layers[layer_surface->layer], &layer->link); wl_list_insert(&output->layers[layer_surface->current.layer], &layer->link);
// Temporarily set the layer's current state to client_pending // Temporarily set the layer's current state to client_pending
// So that we can easily arrange it // So that we can easily arrange it