ssd: allow ssd to be smaller than minimal size by hiding buttons

This fixes the ugly look of SSD for tiny windows (e.g. "xterm -geometry
1x1") due to the early return in `ssd_update_geometry()`. Now SSDs are
rendered correctly for those windows by hiding some buttons when the
window width is smaller than the total width of buttons. Additionally for
windows smaller than (button width)*2, the corners are un-rounded so a
small titlebar can be rendered with a scene-rect.
This commit is contained in:
tokyo4j 2024-08-25 16:33:41 +09:00 committed by Andrew J. Hesford
parent b34f2c9d85
commit 1be69dc28b
6 changed files with 184 additions and 120 deletions

View file

@ -213,10 +213,6 @@ ssd_destroy_parts(struct wl_list *list)
}
/* part->buffer will free itself along the scene_buffer node */
part->buffer = NULL;
if (part->geometry) {
free(part->geometry);
part->geometry = NULL;
}
wl_list_remove(&part->link);
free(part);
}