aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/config.h
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-05-03 15:02:16 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-05-03 15:12:00 +1000
commit55b307cddfa453fc003350a642a68735bc36e50e (patch)
tree4cc54f1be82db862fa4896b5da1d52868a273161 /include/sway/config.h
parentRender titles (diff)
downloadsway-55b307cddfa453fc003350a642a68735bc36e50e.tar.gz
sway-55b307cddfa453fc003350a642a68735bc36e50e.tar.zst
sway-55b307cddfa453fc003350a642a68735bc36e50e.zip
Calculate config->font_height based on existing container titles
Diffstat (limited to 'include/sway/config.h')
-rw-r--r--include/sway/config.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/sway/config.h b/include/sway/config.h
index 02ae3b63..345f26a0 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -304,7 +304,7 @@ struct sway_config {
304 enum sway_container_layout default_orientation; 304 enum sway_container_layout default_orientation;
305 enum sway_container_layout default_layout; 305 enum sway_container_layout default_layout;
306 char *font; 306 char *font;
307 int font_height; 307 size_t font_height;
308 308
309 // Flags 309 // Flags
310 bool focus_follows_mouse; 310 bool focus_follows_mouse;
@@ -461,7 +461,12 @@ struct bar_config *default_bar_config(void);
461 461
462void free_bar_config(struct bar_config *bar); 462void free_bar_config(struct bar_config *bar);
463 463
464int get_font_text_height(char *font); 464/**
465 * Updates the value of config->font_height based on the max title height
466 * reported by each container. If recalculate is true, the containers will
467 * recalculate their heights before reporting.
468 */
469void config_find_font_height(bool recalculate);
465 470
466/* Global config singleton. */ 471/* Global config singleton. */
467extern struct sway_config *config; 472extern struct sway_config *config;