config: change quick terminal size C layout to tagged union

This commit is contained in:
Mitchell Hashimoto
2025-08-26 09:47:03 -07:00
parent 6a78f9c0c0
commit a90bf58080
4 changed files with 37 additions and 24 deletions

View File

@@ -455,11 +455,16 @@ typedef enum {
GHOSTTY_QUICK_TERMINAL_SIZE_NONE,
GHOSTTY_QUICK_TERMINAL_SIZE_PERCENTAGE,
GHOSTTY_QUICK_TERMINAL_SIZE_PIXELS,
} ghostty_quick_terminal_size_e;
} ghostty_quick_terminal_size_tag_e;
typedef union {
float percentage;
uint32_t pixels;
} ghostty_quick_terminal_size_value_u;
typedef struct {
ghostty_quick_terminal_size_e type;
uint32_t value;
ghostty_quick_terminal_size_tag_e tag;
ghostty_quick_terminal_size_value_u value;
} ghostty_quick_terminal_size_s;
typedef struct {