Move corner textures from ssd.c to theme.c

It makes more sense to just keep one set of corner textures for server
side view decorations, rather than storing a set for each view. This also
keeps the code simpler when when changing theme parameters.
This commit is contained in:
Johan Malm 2021-07-16 17:07:00 +01:00
parent c668fd9b07
commit e50bb45890
5 changed files with 182 additions and 140 deletions

View file

@ -19,14 +19,26 @@ enum ssd_part_type {
struct ssd_part {
struct wlr_box box;
enum ssd_part_type type;
/*
* The texture pointers are often held in other places such as the
* theme struct, so here we use ** in order to keep the code
* simple and avoid updating pointers as textures change.
*/
struct {
struct wlr_texture *active;
struct wlr_texture *inactive;
struct wlr_texture **active;
struct wlr_texture **inactive;
} texture;
/*
* If a part does not contain textures, it'll just be rendered as a
* rectangle with the following colors.
*/
struct {
float *active;
float *inactive;
} color;
struct wl_list link;
};