Move title_format from window to container.

This patch moves the title_format information from windows to containers.
Furthermore, it allows correctly setting it on window-less containers and
displays the title accordingly for split containers.

We now also dump and read title_format in GET_TREE / during restarts.

fixes #2120
This commit is contained in:
Ingo Bürk
2015-12-29 12:01:51 -05:00
parent cd172da6ae
commit 1f660a4cc4
15 changed files with 188 additions and 113 deletions

View File

@ -504,6 +504,20 @@ char *get_config_path(const char *override_configpath, bool use_system_paths);
int mkdirp(const char *path, mode_t mode);
#endif
/** Helper structure for usage in format_placeholders(). */
typedef struct placeholder_t {
/* The placeholder to be replaced, e.g., "%title". */
char *name;
/* The value this placeholder should be replaced with. */
char *value;
} placeholder_t;
/**
* Replaces occurences of the defined placeholders in the format string.
*
*/
char *format_placeholders(char *format, placeholder_t *placeholders, int num);
#ifdef CAIRO_SUPPORT
/* We need to flush cairo surfaces twice to avoid an assertion bug. See #1989
* and https://bugs.freedesktop.org/show_bug.cgi?id=92455. */