aboutsummaryrefslogtreecommitdiffstats
path: root/swaybg
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2018-04-03 15:23:51 -0400
committerLibravatar emersion <contact@emersion.fr>2018-04-03 15:23:51 -0400
commit1382b66217bbb90326e1b3d332ddd2ec42dd1e12 (patch)
tree2ed1ce397f0431d8e3a22240346a9cef83d31199 /swaybg
parentFix #1709 (diff)
downloadsway-1382b66217bbb90326e1b3d332ddd2ec42dd1e12.tar.gz
sway-1382b66217bbb90326e1b3d332ddd2ec42dd1e12.tar.zst
sway-1382b66217bbb90326e1b3d332ddd2ec42dd1e12.zip
swaybg: set an empty input region
Diffstat (limited to 'swaybg')
-rw-r--r--swaybg/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/swaybg/main.c b/swaybg/main.c
index 203082f6..b21415b2 100644
--- a/swaybg/main.c
+++ b/swaybg/main.c
@@ -43,6 +43,7 @@ struct swaybg_state {
43 43
44 struct wl_output *output; 44 struct wl_output *output;
45 struct wl_surface *surface; 45 struct wl_surface *surface;
46 struct wl_region *input_region;
46 struct zwlr_layer_surface_v1 *layer_surface; 47 struct zwlr_layer_surface_v1 *layer_surface;
47 48
48 bool run_display; 49 bool run_display;
@@ -204,6 +205,7 @@ static void layer_surface_closed(void *data,
204 struct swaybg_state *state = data; 205 struct swaybg_state *state = data;
205 zwlr_layer_surface_v1_destroy(state->layer_surface); 206 zwlr_layer_surface_v1_destroy(state->layer_surface);
206 wl_surface_destroy(state->surface); 207 wl_surface_destroy(state->surface);
208 wl_region_destroy(state->input_region);
207 state->run_display = false; 209 state->run_display = false;
208} 210}
209 211
@@ -289,6 +291,9 @@ int main(int argc, const char **argv) {
289 291
290 assert(state.surface = wl_compositor_create_surface(state.compositor)); 292 assert(state.surface = wl_compositor_create_surface(state.compositor));
291 293
294 assert(state.input_region = wl_compositor_create_region(state.compositor));
295 wl_surface_set_input_region(state.surface, state.input_region);
296
292 state.layer_surface = zwlr_layer_shell_v1_get_layer_surface( 297 state.layer_surface = zwlr_layer_shell_v1_get_layer_surface(
293 state.layer_shell, state.surface, state.output, 298 state.layer_shell, state.surface, state.output,
294 ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND, "wallpaper"); 299 ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND, "wallpaper");