From: Philipp Middendorf Date: Thu, 9 Aug 2012 10:32:35 +0000 (+0200) Subject: Bugfix: Properly resize transient floating windows with a decoration X-Git-Tag: 4.3~111 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6225a8983d159e9afb8044c7be1232367bfeeaae;p=i3%2Fi3 Bugfix: Properly resize transient floating windows with a decoration fixes #770 --- 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). */