summaryrefslogtreecommitdiff
path: root/sway/desktop/render.c
diff options
context:
space:
mode:
authorDrew DeVault <[email protected]>2018-08-28 10:03:52 -0400
committerGitHub <[email protected]>2018-08-28 10:03:52 -0400
commit83230435f72dd73838bd064c22268ef4ee25e3e6 (patch)
tree7cdac6c37f6ad87c056690bdeac3d5ea0489668d /sway/desktop/render.c
parent98ef29c22878c256dea5b4f0d1eaf556bfcb145f (diff)
parent126a82f14ff47925c7f88523ed9abe0ae9aeb7e8 (diff)
Merge pull request #2511 from RyanDwyer/refactor-arrange
Prepare arrange code for type safe arguments
Diffstat (limited to 'sway/desktop/render.c')
-rw-r--r--sway/desktop/render.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c
index b5a10370..5556e5b3 100644
--- a/sway/desktop/render.c
+++ b/sway/desktop/render.c
@@ -619,9 +619,7 @@ static void render_container_tabbed(struct sway_output *output,
struct sway_container *current = pstate->focused_inactive_child;
struct border_colors *current_colors = &config->border_colors.unfocused;
- double width_gap_adjustment = 2 * pstate->current_gaps;
- int tab_width =
- (pstate->swayc_width - width_gap_adjustment) / pstate->children->length;
+ int tab_width = (pstate->swayc_width) / pstate->children->length;
// Render tabs
for (int i = 0; i < pstate->children->length; ++i) {
@@ -656,11 +654,10 @@ static void render_container_tabbed(struct sway_output *output,
// Make last tab use the remaining width of the parent
if (i == pstate->children->length - 1) {
- tab_width =
- pstate->swayc_width - width_gap_adjustment - tab_width * i;
+ tab_width = pstate->swayc_width - tab_width * i;
}
- render_titlebar(output, damage, child, x, cstate->swayc_y, tab_width,
+ render_titlebar(output, damage, child, x, pstate->swayc_y, tab_width,
colors, title_texture, marks_texture);
if (child == current) {
@@ -721,9 +718,9 @@ static void render_container_stacked(struct sway_output *output,
marks_texture = view ? view->marks_unfocused : NULL;
}
- int y = cstate->swayc_y + titlebar_height * i;
- render_titlebar(output, damage, child, cstate->swayc_x, y,
- cstate->swayc_width, colors, title_texture, marks_texture);
+ int y = pstate->swayc_y + titlebar_height * i;
+ render_titlebar(output, damage, child, pstate->swayc_x, y,
+ pstate->swayc_width, colors, title_texture, marks_texture);
if (child == current) {
current_colors = colors;