|
|
@ -7,16 +7,15 @@
|
|
|
|
struct desktop_shell_state desktop_shell;
|
|
|
|
struct desktop_shell_state desktop_shell;
|
|
|
|
|
|
|
|
|
|
|
|
static void set_background(struct wl_client *client, struct wl_resource *resource,
|
|
|
|
static void set_background(struct wl_client *client, struct wl_resource *resource,
|
|
|
|
struct wl_resource *_output, struct wl_resource *_surface) {
|
|
|
|
struct wl_resource *_output, struct wl_resource *surface) {
|
|
|
|
wlc_handle output = wlc_handle_from_wl_output_resource(_output);
|
|
|
|
wlc_handle output = wlc_handle_from_wl_output_resource(_output);
|
|
|
|
wlc_handle surface = wlc_handle_from_wl_surface_resource(_surface);
|
|
|
|
if (!output) {
|
|
|
|
sway_log(L_DEBUG, "Setting surface %d as background for output %d", (int)surface, (int)output);
|
|
|
|
|
|
|
|
if (!output || !surface) {
|
|
|
|
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
sway_log(L_DEBUG, "Setting surface %p as background for output %d", surface, (int)output);
|
|
|
|
struct background_config *config = malloc(sizeof(struct background_config));
|
|
|
|
struct background_config *config = malloc(sizeof(struct background_config));
|
|
|
|
config->output = output;
|
|
|
|
config->output = output;
|
|
|
|
config->surface = surface;
|
|
|
|
config->surface = wlc_resource_from_wl_surface_resource(surface);
|
|
|
|
list_add(desktop_shell.backgrounds, config);
|
|
|
|
list_add(desktop_shell.backgrounds, config);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|