From ad5a6eb71fc598c58228141370626e125b5576e3 Mon Sep 17 00:00:00 2001
From: Jonathan Wilkes <jon.w.wilkes@gmail.com>
Date: Tue, 20 Oct 2015 18:59:04 -0400
Subject: [PATCH] ported from pd-l2ork git: commit
 656478c176a33d6a12854c10fdbb3d94f96738f6  *added check whether a window is
 visible before requesting resizing of a text object box (fixes otherwise
 benign error reports, Nicola Pandini reported)

---
 pd/src/g_rtext.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pd/src/g_rtext.c b/pd/src/g_rtext.c
index e2f717e9c..57a776d3c 100644
--- a/pd/src/g_rtext.c
+++ b/pd/src/g_rtext.c
@@ -395,9 +395,9 @@ static void rtext_senditup(t_rtext *x, int action, int *widthp, int *heightp,
             // pd_canvas.html.  I could remove the conditional, but
             // this part of Pd is convoluted enough that I'm not sure
             // if there'd be any side effects.
-            if (pixwide != x->x_drawnwidth ||
+            if (glist_isvisible(x->x_glist) && (pixwide != x->x_drawnwidth ||
                 pixhigh != x->x_drawnheight ||
-                x->x_text->te_type == T_MESSAGE) 
+                x->x_text->te_type == T_MESSAGE)) 
                 text_drawborder(x->x_text, x->x_glist, x->x_tag,
                     pixwide, pixhigh, 0);
             if (x->x_active)
-- 
GitLab