Merge branch 'fix-floating-size'

This commit is contained in:
Michael Stapelberg 2013-04-02 23:59:48 +02:00
commit 4f72c5c5fc
2 changed files with 14 additions and 7 deletions

View File

@ -1079,6 +1079,12 @@ Rect con_border_style_rect(Con *con) {
} else { } else {
result = (Rect){border_width, border_width, -(2 * border_width), -(2 * border_width)}; result = (Rect){border_width, border_width, -(2 * border_width), -(2 * border_width)};
} }
/* Floating windows are never adjacent to any other window, so
dont hide their border(s). This prevents bug #998. */
if (con_is_floating(con))
return result;
if (borders_to_hide & ADJ_LEFT_SCREEN_EDGE) { if (borders_to_hide & ADJ_LEFT_SCREEN_EDGE) {
result.x -= border_width; result.x -= border_width;
result.width += border_width; result.width += border_width;

View File

@ -19,7 +19,7 @@
# ticket #770, bug still present in commit ae88accf6fe3817ff42d0d51be1965071194766e # ticket #770, bug still present in commit ae88accf6fe3817ff42d0d51be1965071194766e
use i3test i3_autostart => 0; use i3test i3_autostart => 0;
sub test_with_new_window_value { sub test_with_config {
my ($value) = @_; my ($value) = @_;
my $config = <<EOT; my $config = <<EOT;
@ -28,8 +28,8 @@ font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
EOT EOT
if (defined($value)) { if (defined($value)) {
$config .= "new_window $value\n"; $config .= "$value\n";
diag("testing with new_window $value"); diag("testing with $value");
} else { } else {
diag("testing without new_window"); diag("testing without new_window");
} }
@ -49,9 +49,10 @@ EOT
exit_gracefully($pid); exit_gracefully($pid);
} }
test_with_new_window_value(undef); test_with_config(undef);
test_with_new_window_value('1pixel'); test_with_config('new_window 1pixel');
test_with_new_window_value('normal'); test_with_config('new_window normal');
test_with_new_window_value('none'); test_with_config('new_window none');
test_with_config('hide_edge_borders both');
done_testing; done_testing;