diff options
author | Mikkel Oscar Lyderik <[email protected]> | 2016-04-24 01:47:57 +0200 |
---|---|---|
committer | Mikkel Oscar Lyderik <[email protected]> | 2016-04-25 00:00:49 +0200 |
commit | 6c7ed7e7cb1f25429db05103b98e6fcee11d0362 (patch) | |
tree | 1e17e7ff8c2957ee96a22751533e71da4a6e9790 /sway/commands.c | |
parent | 5492277f0c007eea632d242a6d7cbd9cee7cdcf6 (diff) |
Add title to nested tabbed/stacked containers
Diffstat (limited to 'sway/commands.c')
-rw-r--r-- | sway/commands.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sway/commands.c b/sway/commands.c index ff1ddc5b..34364917 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -1,6 +1,7 @@ #include <xkbcommon/xkbcommon.h> #include <xkbcommon/xkbcommon-names.h> #include <wlc/wlc.h> +#include <wlc/wlc-render.h> #include <stdio.h> #include <stdlib.h> #include <errno.h> @@ -2041,6 +2042,17 @@ static struct cmd_results *_do_split(int argc, char **argv, int layout) { set_focused_container(focused); arrange_windows(parent, -1, -1); } + + // update container title if tabbed/stacked + if (swayc_tabbed_stacked_parent(focused)) { + update_view_border(focused); + swayc_t *output = swayc_parent_by_type(focused, C_OUTPUT); + // schedule render to make changes take effect right away, + // otherwise we would have to wait for the view to render, + // which is unpredictable. + wlc_output_schedule_render(output->handle); + } + return cmd_results_new(CMD_SUCCESS, NULL, NULL); } |