diff options
Diffstat (limited to 'sway/extensions.c')
-rw-r--r-- | sway/extensions.c | 9 |
1 files changed, 4 insertions, 5 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 @@ | |||
7 | struct desktop_shell_state desktop_shell; | 7 | struct desktop_shell_state desktop_shell; |
8 | 8 | ||
9 | static void set_background(struct wl_client *client, struct wl_resource *resource, | 9 | static void set_background(struct wl_client *client, struct wl_resource *resource, |
10 | struct wl_resource *_output, struct wl_resource *_surface) { | 10 | struct wl_resource *_output, struct wl_resource *surface) { |
11 | wlc_handle output = wlc_handle_from_wl_output_resource(_output); | 11 | wlc_handle output = wlc_handle_from_wl_output_resource(_output); |
12 | wlc_handle surface = wlc_handle_from_wl_surface_resource(_surface); | 12 | if (!output) { |
13 | sway_log(L_DEBUG, "Setting surface %d as background for output %d", (int)surface, (int)output); | ||
14 | if (!output || !surface) { | ||
15 | return; | 13 | return; |
16 | } | 14 | } |
15 | sway_log(L_DEBUG, "Setting surface %p as background for output %d", surface, (int)output); | ||
17 | struct background_config *config = malloc(sizeof(struct background_config)); | 16 | struct background_config *config = malloc(sizeof(struct background_config)); |
18 | config->output = output; | 17 | config->output = output; |
19 | config->surface = surface; | 18 | config->surface = wlc_resource_from_wl_surface_resource(surface); |
20 | list_add(desktop_shell.backgrounds, config); | 19 | list_add(desktop_shell.backgrounds, config); |
21 | } | 20 | } |
22 | 21 | ||