diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-11-19 07:23:11 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-11-19 07:23:11 -0500 |
commit | 4a1584be535a2d851250854d46a3563e222fe953 (patch) | |
tree | 0e4b20ccca782bf68d0a12a200df1997b5f547ee /sway | |
parent | 65b8a5c3ce023584cdc5dd84394ea1101c9f23e9 (diff) | |
download | sway-4a1584be535a2d851250854d46a3563e222fe953.tar.xz |
Fix background extensions
Thanks @Cloudef, it works great
Diffstat (limited to 'sway')
-rw-r--r-- | sway/extensions.c | 9 | ||||
-rw-r--r-- | sway/handlers.c | 1 |
2 files changed, 4 insertions, 6 deletions
diff --git a/sway/extensions.c b/sway/extensions.c index 5ef8a0ff..35a2632e 100644 --- a/sway/extensions.c +++ b/sway/extensions.c @@ -7,16 +7,15 @@ struct desktop_shell_state desktop_shell; 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 surface = wlc_handle_from_wl_surface_resource(_surface); - sway_log(L_DEBUG, "Setting surface %d as background for output %d", (int)surface, (int)output); - if (!output || !surface) { + if (!output) { 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)); config->output = output; - config->surface = surface; + config->surface = wlc_resource_from_wl_surface_resource(surface); list_add(desktop_shell.backgrounds, config); } diff --git a/sway/handlers.c b/sway/handlers.c index 9e98cffe..dde9b88b 100644 --- a/sway/handlers.c +++ b/sway/handlers.c @@ -70,7 +70,6 @@ static void handle_output_pre_render(wlc_handle output) { for (i = 0; i < desktop_shell.backgrounds->length; ++i) { struct background_config *config = desktop_shell.backgrounds->items[i]; if (config->output == output) { - sway_log(L_DEBUG, "Rendering background surface %d", (int)config->surface); wlc_surface_render(config->surface, &(struct wlc_geometry){ wlc_origin_zero, *wlc_output_get_resolution(output) }); break; } |