diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-05-03 08:20:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-03 08:20:27 -0400 |
commit | 87e65e5c5b95e1b7c58bd1b722c97ebe0db8b477 (patch) | |
tree | e3ca897c922da50ec0fd68ed097acf1b7153f61f /include/sway | |
parent | f3d0885524f4f1dc568baf21fcc8e387a316703f (diff) | |
parent | 58a033d8163c922eff8577b34523418c2c2ab432 (diff) |
Merge pull request #1895 from RyanDwyer/show-titles
Render titles
Diffstat (limited to 'include/sway')
-rw-r--r-- | include/sway/config.h | 9 | ||||
-rw-r--r-- | include/sway/tree/container.h | 16 |
2 files changed, 24 insertions, 1 deletions
diff --git a/include/sway/config.h b/include/sway/config.h index a0113e98..db942c3f 100644 --- a/include/sway/config.h +++ b/include/sway/config.h @@ -304,7 +304,7 @@ struct sway_config { enum sway_container_layout default_orientation; enum sway_container_layout default_layout; char *font; - int font_height; + size_t font_height; // Flags bool focus_follows_mouse; @@ -461,6 +461,13 @@ struct bar_config *default_bar_config(void); void free_bar_config(struct bar_config *bar); +/** + * Updates the value of config->font_height based on the max title height + * reported by each container. If recalculate is true, the containers will + * recalculate their heights before reporting. + */ +void config_find_font_height(bool recalculate); + /* Global config singleton. */ extern struct sway_config *config; diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h index d092af49..b07af72c 100644 --- a/include/sway/tree/container.h +++ b/include/sway/tree/container.h @@ -85,6 +85,12 @@ struct sway_container { float alpha; + struct wlr_texture *title_focused; + struct wlr_texture *title_focused_inactive; + struct wlr_texture *title_unfocused; + struct wlr_texture *title_urgent; + size_t title_height; + struct { struct wl_signal destroy; // Raised after the tree updates, but before arrange_windows @@ -191,4 +197,14 @@ struct sway_container *container_reap_empty_recursive( struct sway_container *container_flatten(struct sway_container *container); +void container_update_title_textures(struct sway_container *container); + +/** + * Calculate the container's title_height property. + */ +void container_calculate_title_height(struct sway_container *container); + +void container_update_title(struct sway_container *container, + const char *new_title); + #endif |