diff options
author | emersion <contact@emersion.fr> | 2018-05-05 20:03:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-05 20:03:46 +0100 |
commit | 786727d8bbd00f44f1b29368a3579cbe6899ba16 (patch) | |
tree | 80579da473fb095b61a4693a1ab009d2fb6ea595 /include/sway | |
parent | b4249166f309a46c15dd3a5734594aee961b723b (diff) | |
parent | 967b14c2279b6a09830912b09d54668119045967 (diff) |
Merge branch 'master' into usr-lib
Diffstat (limited to 'include/sway')
-rw-r--r-- | include/sway/commands.h | 1 | ||||
-rw-r--r-- | include/sway/config.h | 5 | ||||
-rw-r--r-- | include/sway/tree/container.h | 6 | ||||
-rw-r--r-- | include/sway/tree/view.h | 10 |
4 files changed, 18 insertions, 4 deletions
diff --git a/include/sway/commands.h b/include/sway/commands.h index 0732a90a..d39ac56c 100644 --- a/include/sway/commands.h +++ b/include/sway/commands.h @@ -144,6 +144,7 @@ sway_cmd cmd_splitt; sway_cmd cmd_splitv; sway_cmd cmd_sticky; sway_cmd cmd_swaybg_command; +sway_cmd cmd_title_format; sway_cmd cmd_unmark; sway_cmd cmd_workspace; sway_cmd cmd_ws_auto_back_and_forth; diff --git a/include/sway/config.h b/include/sway/config.h index db942c3f..fa40ef4e 100644 --- a/include/sway/config.h +++ b/include/sway/config.h @@ -465,8 +465,11 @@ 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. + * + * If the height has changed, all containers will be rearranged to take on the + * new size. */ -void config_find_font_height(bool recalculate); +void config_update_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 b07af72c..61ab7ca1 100644 --- a/include/sway/tree/container.h +++ b/include/sway/tree/container.h @@ -63,7 +63,8 @@ struct sway_container { */ size_t id; - char *name; + char *name; // The view's title (unformatted) + char *formatted_title; // The title displayed in the title bar enum sway_container_type type; enum sway_container_layout layout; @@ -204,7 +205,6 @@ void container_update_title_textures(struct sway_container *container); */ void container_calculate_title_height(struct sway_container *container); -void container_update_title(struct sway_container *container, - const char *new_title); +void container_notify_child_title_changed(struct sway_container *container); #endif diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index 21127ab1..9d4256f7 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h @@ -48,6 +48,7 @@ struct sway_view { bool is_fullscreen; + char *title_format; enum sway_container_border border; int border_thickness; @@ -164,6 +165,8 @@ const char *view_get_class(struct sway_view *view); const char *view_get_instance(struct sway_view *view); +const char *view_get_type(struct sway_view *view); + void view_configure(struct sway_view *view, double ox, double oy, int width, int height); @@ -207,4 +210,11 @@ void view_child_init(struct sway_view_child *child, void view_child_destroy(struct sway_view_child *child); +/** + * Re-read the view's title property and update any relevant title bars. + * The force argument makes it recreate the title bars even if the title hasn't + * changed. + */ +void view_update_title(struct sway_view *view, bool force); + #endif |