aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-05-03 08:20:27 -0400
committerLibravatar GitHub <noreply@github.com>2018-05-03 08:20:27 -0400
commit87e65e5c5b95e1b7c58bd1b722c97ebe0db8b477 (patch)
treee3ca897c922da50ec0fd68ed097acf1b7153f61f /include
parentMerge pull request #1893 from swaywm/touch (diff)
parentConvert border_colors.text to float[4] (diff)
downloadsway-87e65e5c5b95e1b7c58bd1b722c97ebe0db8b477.tar.gz
sway-87e65e5c5b95e1b7c58bd1b722c97ebe0db8b477.tar.zst
sway-87e65e5c5b95e1b7c58bd1b722c97ebe0db8b477.zip
Merge pull request #1895 from RyanDwyer/show-titles
Render titles
Diffstat (limited to 'include')
-rw-r--r--include/sway/config.h9
-rw-r--r--include/sway/tree/container.h16
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 {
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,6 +461,13 @@ 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
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);
470
464/* Global config singleton. */ 471/* Global config singleton. */
465extern struct sway_config *config; 472extern struct sway_config *config;
466 473
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 {
85 85
86 float alpha; 86 float alpha;
87 87
88 struct wlr_texture *title_focused;
89 struct wlr_texture *title_focused_inactive;
90 struct wlr_texture *title_unfocused;
91 struct wlr_texture *title_urgent;
92 size_t title_height;
93
88 struct { 94 struct {
89 struct wl_signal destroy; 95 struct wl_signal destroy;
90 // Raised after the tree updates, but before arrange_windows 96 // Raised after the tree updates, but before arrange_windows
@@ -191,4 +197,14 @@ struct sway_container *container_reap_empty_recursive(
191 197
192struct sway_container *container_flatten(struct sway_container *container); 198struct sway_container *container_flatten(struct sway_container *container);
193 199
200void container_update_title_textures(struct sway_container *container);
201
202/**
203 * Calculate the container's title_height property.
204 */
205void container_calculate_title_height(struct sway_container *container);
206
207void container_update_title(struct sway_container *container,
208 const char *new_title);
209
194#endif 210#endif