ssd: dynamically look up window icons in titlebar for output scales

by introducing scaled_icon_buffer.
This commit is contained in:
tokyo4j 2025-01-12 16:43:49 +09:00 committed by Consolatis
parent 5e29f79258
commit dc474521ab
9 changed files with 225 additions and 102 deletions

View file

@ -24,10 +24,16 @@ struct ssd_button {
*/
uint8_t state_set;
/*
* Button nodes for each combination of hover/toggled/rounded states.
* nodes[state_set] should be displayed.
* Image buffers for each combination of hover/toggled/rounded states.
* img_buffers[state_set] is displayed. Some of these can be NULL
* (e.g. img_buffers[LAB_BS_ROUNDED] is set only for corner buttons).
*
* When "type" is LAB_SSD_BUTTON_WINDOW_ICON, these are all NULL and
* window_icon is used instead.
*/
struct wlr_scene_node *nodes[LAB_BS_ALL + 1];
struct scaled_img_buffer *img_buffers[LAB_BS_ALL + 1];
struct scaled_icon_buffer *window_icon;
struct wl_listener destroy;
};