diff options
-rw-r--r-- | sway/desktop/layer_shell.c | 2 | ||||
-rw-r--r-- | swaybg/main.c | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c index 3c7b45f7..663ec7ba 100644 --- a/sway/desktop/layer_shell.c +++ b/sway/desktop/layer_shell.c @@ -278,6 +278,8 @@ static void handle_map(struct wl_listener *listener, void *data) { sway_layer, map); struct sway_output *output = sway_layer->layer_surface->output->data; wlr_output_damage_add_box(output->damage, &sway_layer->geo); + wlr_surface_send_enter(sway_layer->layer_surface->surface, + sway_layer->layer_surface->output); } static void handle_unmap(struct wl_listener *listener, void *data) { diff --git a/swaybg/main.c b/swaybg/main.c index 25a1d73a..c282a707 100644 --- a/swaybg/main.c +++ b/swaybg/main.c @@ -43,6 +43,7 @@ struct swaybg_state { struct wl_output *output; struct wl_surface *surface; + struct wl_region *input_region; struct zwlr_layer_surface_v1 *layer_surface; bool run_display; @@ -207,6 +208,7 @@ static void layer_surface_closed(void *data, struct swaybg_state *state = data; zwlr_layer_surface_v1_destroy(state->layer_surface); wl_surface_destroy(state->surface); + wl_region_destroy(state->input_region); state->run_display = false; } @@ -326,6 +328,9 @@ int main(int argc, const char **argv) { assert(state.surface = wl_compositor_create_surface(state.compositor)); + assert(state.input_region = wl_compositor_create_region(state.compositor)); + wl_surface_set_input_region(state.surface, state.input_region); + state.layer_surface = zwlr_layer_shell_v1_get_layer_surface( state.layer_shell, state.surface, state.output, ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND, "wallpaper"); |