extensions: panel_config->resource => wl_surface_res.
Change the name to something less ambigious.
This commit is contained in:
parent
3777c8993b
commit
6db0f6f80f
|
@ -9,13 +9,15 @@
|
|||
struct background_config {
|
||||
wlc_handle output;
|
||||
wlc_resource surface;
|
||||
struct wl_resource *resource;
|
||||
// we need the wl_resource of the surface in the destructor
|
||||
struct wl_resource *wl_surface_res;
|
||||
};
|
||||
|
||||
struct panel_config {
|
||||
wlc_handle output;
|
||||
wlc_resource surface;
|
||||
struct wl_resource *resource;
|
||||
// we need the wl_resource of the surface in the destructor
|
||||
struct wl_resource *wl_surface_res;
|
||||
};
|
||||
|
||||
struct desktop_shell_state {
|
||||
|
|
|
@ -14,7 +14,7 @@ void background_surface_destructor(struct wl_resource *resource) {
|
|||
int i;
|
||||
for (i = 0; i < desktop_shell.backgrounds->length; ++i) {
|
||||
struct background_config *config = desktop_shell.backgrounds->items[i];
|
||||
if (config->resource == resource) {
|
||||
if (config->wl_surface_res == resource) {
|
||||
list_del(desktop_shell.backgrounds, i);
|
||||
break;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ void panel_surface_destructor(struct wl_resource *resource) {
|
|||
int i;
|
||||
for (i = 0; i < desktop_shell.panels->length; ++i) {
|
||||
struct panel_config *config = desktop_shell.panels->items[i];
|
||||
if (config->resource == resource) {
|
||||
if (config->wl_surface_res == resource) {
|
||||
list_del(desktop_shell.panels, i);
|
||||
arrange_windows(&root_container, -1, -1);
|
||||
break;
|
||||
|
@ -58,7 +58,7 @@ static void set_background(struct wl_client *client, struct wl_resource *resourc
|
|||
struct background_config *config = malloc(sizeof(struct background_config));
|
||||
config->output = output;
|
||||
config->surface = wlc_resource_from_wl_surface_resource(surface);
|
||||
config->resource = surface;
|
||||
config->wl_surface_res = surface;
|
||||
list_add(desktop_shell.backgrounds, config);
|
||||
wl_resource_set_destructor(surface, background_surface_destructor);
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ static void set_panel(struct wl_client *client, struct wl_resource *resource,
|
|||
struct panel_config *config = malloc(sizeof(struct panel_config));
|
||||
config->output = output;
|
||||
config->surface = wlc_resource_from_wl_surface_resource(surface);
|
||||
config->resource = surface;
|
||||
config->wl_surface_res = surface;
|
||||
list_add(desktop_shell.panels, config);
|
||||
wl_resource_set_destructor(surface, panel_surface_destructor);
|
||||
desktop_shell.panel_size = *wlc_surface_get_size(config->surface);
|
||||
|
|
Loading…
Reference in a new issue