From 0901720a24fde4503e5d2071f7c180531b2a634b Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Tue, 2 Apr 2013 23:59:26 +0200 Subject: [PATCH] Bugfix: fix floating window size with hide_edge_borders (+test) fixes #998 --- src/con.c | 6 ++++++ testcases/t/194-regress-floating-size.t | 15 ++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/con.c b/src/con.c index 559c1375..1050513a 100644 --- a/src/con.c +++ b/src/con.c @@ -1079,6 +1079,12 @@ Rect con_border_style_rect(Con *con) { } else { result = (Rect){border_width, border_width, -(2 * border_width), -(2 * border_width)}; } + + /* Floating windows are never adjacent to any other window, so + don’t hide their border(s). This prevents bug #998. */ + if (con_is_floating(con)) + return result; + if (borders_to_hide & ADJ_LEFT_SCREEN_EDGE) { result.x -= border_width; result.width += border_width; diff --git a/testcases/t/194-regress-floating-size.t b/testcases/t/194-regress-floating-size.t index dc6739e5..a86cc6bf 100644 --- a/testcases/t/194-regress-floating-size.t +++ b/testcases/t/194-regress-floating-size.t @@ -19,7 +19,7 @@ # ticket #770, bug still present in commit ae88accf6fe3817ff42d0d51be1965071194766e use i3test i3_autostart => 0; -sub test_with_new_window_value { +sub test_with_config { my ($value) = @_; my $config = <