/* Icons */
struct wlr_scene_node *nodes[LAB_BS_ALL + 1] = {0};
- for (uint8_t state_set = 0; state_set <= LAB_BS_ALL; state_set++) {
+ for (uint8_t state_set = LAB_BS_DEFAULT;
+ state_set <= LAB_BS_ALL; state_set++) {
if (!imgs[state_set]) {
continue;
}
button->state_set &= ~state;
}
/* Switch the displayed icon buffer to the new one */
- for (uint8_t state_set = 0; state_set <= LAB_BS_ALL; state_set++) {
+ for (uint8_t state_set = LAB_BS_DEFAULT;
+ state_set <= LAB_BS_ALL; state_set++) {
if (!button->nodes[state_set]) {
continue;
}
/* Replace all the buffers in the button with the window icon */
struct ssd_button *button = node_ssd_button_from_node(part->node);
- for (uint8_t state_set = 0; state_set <= LAB_BS_ALL; state_set++) {
+ for (uint8_t state_set = LAB_BS_DEFAULT;
+ state_set <= LAB_BS_ALL; state_set++) {
struct wlr_scene_node *node = button->nodes[state_set];
if (node) {
struct scaled_img_buffer *img_buffer =
{
for (enum ssd_part_type type = LAB_SSD_BUTTON_FIRST;
type <= LAB_SSD_BUTTON_LAST; type++) {
- for (uint8_t state_set = 0; state_set <= LAB_BS_ALL;
- state_set++) {
+ for (uint8_t state_set = LAB_BS_DEFAULT;
+ state_set <= LAB_BS_ALL; state_set++) {
destroy_img(&theme->window[THEME_INACTIVE]
.button_imgs[type][state_set]);
destroy_img(&theme->window[THEME_ACTIVE]