From 14cb39c77244aa54f1f2aa8c828b656eaf333fda Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Wed, 28 Nov 2018 14:18:30 -0500 Subject: Fix titlebar when no title or marks This fixes the rendering of the titlebar when there is no title or marks. --- sway/desktop/render.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sway/desktop/render.c') diff --git a/sway/desktop/render.c b/sway/desktop/render.c index eeda496c..ca8ef83b 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c @@ -555,7 +555,12 @@ static void render_titlebar(struct sway_output *output, // Determine the left + right extends of the textures (output-buffer local) int ob_left_x, ob_left_width, ob_right_x, ob_right_width; - if (ob_title_x < ob_marks_x) { + if (ob_title_width == 0 && ob_marks_width == 0) { + ob_left_x = ob_inner_x; + ob_left_width = 0; + ob_right_x = ob_inner_x; + ob_right_width = 0; + } else if (ob_title_x < ob_marks_x) { ob_left_x = ob_title_x; ob_left_width = ob_title_width; ob_right_x = ob_marks_x; -- cgit v1.2.3