From 6225a8983d159e9afb8044c7be1232367bfeeaae Mon Sep 17 00:00:00 2001 From: Philipp Middendorf Date: Thu, 9 Aug 2012 12:32:35 +0200 Subject: [PATCH] Bugfix: Properly resize transient floating windows with a decoration fixes #770 --- src/floating.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/floating.c b/src/floating.c index c47884bc..69241b58 100644 --- a/src/floating.c +++ b/src/floating.c @@ -182,6 +182,10 @@ void floating_enable(Con *con, bool automatic) { con->percent = 1.0; con->floating = FLOATING_USER_ON; + /* 4: set the border style as specified with new_float */ + if (automatic) + con->border_style = config.default_floating_border; + /* Add pixels for the decoration. */ Rect border_style_rect = con_border_style_rect(con); @@ -230,11 +234,6 @@ void floating_enable(Con *con, bool automatic) { DLOG("Floating rect: (%d, %d) with %d x %d\n", nc->rect.x, nc->rect.y, nc->rect.width, nc->rect.height); - - /* 4: set the border style as specified with new_float */ - if (automatic) - con->border_style = config.default_floating_border; - /* 5: Subtract the deco_height in order to make the floating window appear * at precisely the position it specified in its original geometry (which * is what applications might remember). */ -- 2.39.5