mirror of
https://github.com/swaywm/sway.git
synced 2024-11-11 04:54:14 +01:00
swaybg: set an empty input region
This commit is contained in:
parent
f366ef373e
commit
1382b66217
@ -43,6 +43,7 @@ struct swaybg_state {
|
|||||||
|
|
||||||
struct wl_output *output;
|
struct wl_output *output;
|
||||||
struct wl_surface *surface;
|
struct wl_surface *surface;
|
||||||
|
struct wl_region *input_region;
|
||||||
struct zwlr_layer_surface_v1 *layer_surface;
|
struct zwlr_layer_surface_v1 *layer_surface;
|
||||||
|
|
||||||
bool run_display;
|
bool run_display;
|
||||||
@ -204,6 +205,7 @@ static void layer_surface_closed(void *data,
|
|||||||
struct swaybg_state *state = data;
|
struct swaybg_state *state = data;
|
||||||
zwlr_layer_surface_v1_destroy(state->layer_surface);
|
zwlr_layer_surface_v1_destroy(state->layer_surface);
|
||||||
wl_surface_destroy(state->surface);
|
wl_surface_destroy(state->surface);
|
||||||
|
wl_region_destroy(state->input_region);
|
||||||
state->run_display = false;
|
state->run_display = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -289,6 +291,9 @@ int main(int argc, const char **argv) {
|
|||||||
|
|
||||||
assert(state.surface = wl_compositor_create_surface(state.compositor));
|
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_surface = zwlr_layer_shell_v1_get_layer_surface(
|
||||||
state.layer_shell, state.surface, state.output,
|
state.layer_shell, state.surface, state.output,
|
||||||
ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND, "wallpaper");
|
ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND, "wallpaper");
|
||||||
|
Loading…
Reference in New Issue
Block a user