diff options
author | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-04-24 01:47:57 +0200 |
---|---|---|
committer | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-04-25 00:00:49 +0200 |
commit | 6c7ed7e7cb1f25429db05103b98e6fcee11d0362 (patch) | |
tree | 1e17e7ff8c2957ee96a22751533e71da4a6e9790 /sway/commands.c | |
parent | Disable inner gaps when in tabbed/stacked mode (diff) | |
download | sway-6c7ed7e7cb1f25429db05103b98e6fcee11d0362.tar.gz sway-6c7ed7e7cb1f25429db05103b98e6fcee11d0362.tar.zst sway-6c7ed7e7cb1f25429db05103b98e6fcee11d0362.zip |
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 @@ | |||
1 | #include <xkbcommon/xkbcommon.h> | 1 | #include <xkbcommon/xkbcommon.h> |
2 | #include <xkbcommon/xkbcommon-names.h> | 2 | #include <xkbcommon/xkbcommon-names.h> |
3 | #include <wlc/wlc.h> | 3 | #include <wlc/wlc.h> |
4 | #include <wlc/wlc-render.h> | ||
4 | #include <stdio.h> | 5 | #include <stdio.h> |
5 | #include <stdlib.h> | 6 | #include <stdlib.h> |
6 | #include <errno.h> | 7 | #include <errno.h> |
@@ -2041,6 +2042,17 @@ static struct cmd_results *_do_split(int argc, char **argv, int layout) { | |||
2041 | set_focused_container(focused); | 2042 | set_focused_container(focused); |
2042 | arrange_windows(parent, -1, -1); | 2043 | arrange_windows(parent, -1, -1); |
2043 | } | 2044 | } |
2045 | |||
2046 | // update container title if tabbed/stacked | ||
2047 | if (swayc_tabbed_stacked_parent(focused)) { | ||
2048 | update_view_border(focused); | ||
2049 | swayc_t *output = swayc_parent_by_type(focused, C_OUTPUT); | ||
2050 | // schedule render to make changes take effect right away, | ||
2051 | // otherwise we would have to wait for the view to render, | ||
2052 | // which is unpredictable. | ||
2053 | wlc_output_schedule_render(output->handle); | ||
2054 | } | ||
2055 | |||
2044 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | 2056 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); |
2045 | } | 2057 | } |
2046 | 2058 | ||