diff options
author | 2015-12-20 12:42:10 +0100 | |
---|---|---|
committer | 2015-12-20 12:54:34 +0100 | |
commit | 6db0f6f80f75f7e141e3a8b0c19fa317354bf5cc (patch) | |
tree | bc08973770f5ad6b3281db9c33c60668fa3da03b /sway/extensions.c | |
parent | Merge pull request #366 from mikkeloscar/fix-swaybar-high-cpu (diff) | |
download | sway-6db0f6f80f75f7e141e3a8b0c19fa317354bf5cc.tar.gz sway-6db0f6f80f75f7e141e3a8b0c19fa317354bf5cc.tar.zst sway-6db0f6f80f75f7e141e3a8b0c19fa317354bf5cc.zip |
extensions: panel_config->resource => wl_surface_res.
Change the name to something less ambigious.
Diffstat (limited to 'sway/extensions.c')
-rw-r--r-- | sway/extensions.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/extensions.c b/sway/extensions.c index 5e09bdbb..d37eaddd 100644 --- a/sway/extensions.c +++ b/sway/extensions.c | |||
@@ -14,7 +14,7 @@ void background_surface_destructor(struct wl_resource *resource) { | |||
14 | int i; | 14 | int i; |
15 | for (i = 0; i < desktop_shell.backgrounds->length; ++i) { | 15 | for (i = 0; i < desktop_shell.backgrounds->length; ++i) { |
16 | struct background_config *config = desktop_shell.backgrounds->items[i]; | 16 | struct background_config *config = desktop_shell.backgrounds->items[i]; |
17 | if (config->resource == resource) { | 17 | if (config->wl_surface_res == resource) { |
18 | list_del(desktop_shell.backgrounds, i); | 18 | list_del(desktop_shell.backgrounds, i); |
19 | break; | 19 | break; |
20 | } | 20 | } |
@@ -26,7 +26,7 @@ void panel_surface_destructor(struct wl_resource *resource) { | |||
26 | int i; | 26 | int i; |
27 | for (i = 0; i < desktop_shell.panels->length; ++i) { | 27 | for (i = 0; i < desktop_shell.panels->length; ++i) { |
28 | struct panel_config *config = desktop_shell.panels->items[i]; | 28 | struct panel_config *config = desktop_shell.panels->items[i]; |
29 | if (config->resource == resource) { | 29 | if (config->wl_surface_res == resource) { |
30 | list_del(desktop_shell.panels, i); | 30 | list_del(desktop_shell.panels, i); |
31 | arrange_windows(&root_container, -1, -1); | 31 | arrange_windows(&root_container, -1, -1); |
32 | break; | 32 | break; |
@@ -58,7 +58,7 @@ static void set_background(struct wl_client *client, struct wl_resource *resourc | |||
58 | struct background_config *config = malloc(sizeof(struct background_config)); | 58 | struct background_config *config = malloc(sizeof(struct background_config)); |
59 | config->output = output; | 59 | config->output = output; |
60 | config->surface = wlc_resource_from_wl_surface_resource(surface); | 60 | config->surface = wlc_resource_from_wl_surface_resource(surface); |
61 | config->resource = surface; | 61 | config->wl_surface_res = surface; |
62 | list_add(desktop_shell.backgrounds, config); | 62 | list_add(desktop_shell.backgrounds, config); |
63 | wl_resource_set_destructor(surface, background_surface_destructor); | 63 | wl_resource_set_destructor(surface, background_surface_destructor); |
64 | } | 64 | } |
@@ -73,7 +73,7 @@ static void set_panel(struct wl_client *client, struct wl_resource *resource, | |||
73 | struct panel_config *config = malloc(sizeof(struct panel_config)); | 73 | struct panel_config *config = malloc(sizeof(struct panel_config)); |
74 | config->output = output; | 74 | config->output = output; |
75 | config->surface = wlc_resource_from_wl_surface_resource(surface); | 75 | config->surface = wlc_resource_from_wl_surface_resource(surface); |
76 | config->resource = surface; | 76 | config->wl_surface_res = surface; |
77 | list_add(desktop_shell.panels, config); | 77 | list_add(desktop_shell.panels, config); |
78 | wl_resource_set_destructor(surface, panel_surface_destructor); | 78 | wl_resource_set_destructor(surface, panel_surface_destructor); |
79 | desktop_shell.panel_size = *wlc_surface_get_size(config->surface); | 79 | desktop_shell.panel_size = *wlc_surface_get_size(config->surface); |