From 66e8df11264a612fe4e93a1e197439f689ba4213 Mon Sep 17 00:00:00 2001
From: Sojourner Truth <jon.w.wilkes@gmail.com>
Date: Thu, 14 Jul 2016 01:18:41 -0400
Subject: [PATCH] add my_canvas_class conditional in g_editor.c to disallow
 resize anchor, since it abuses an extra label handle for resizing.

---
 pd/src/g_all_guis.c |  2 +-
 pd/src/g_editor.c   | 11 +++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/pd/src/g_all_guis.c b/pd/src/g_all_guis.c
index 2a17c2146..5e30fed67 100644
--- a/pd/src/g_all_guis.c
+++ b/pd/src/g_all_guis.c
@@ -734,7 +734,7 @@ void scalehandle_draw_select2(t_iemgui *x) {
     /* we're not drawing the scalehandle for the actual iemgui-- just
        the one for the label. */
     if (c == my_canvas_class)
-        scalehandle_draw_select(x->x_handle,sx-1,sy-1);
+        scalehandle_draw_select(x->x_handle,sx+8,sy+3);
     if (x->x_lab != s_empty)
         scalehandle_draw_select(x->x_lhandle,x->x_ldx,x->x_ldy);
 }
diff --git a/pd/src/g_editor.c b/pd/src/g_editor.c
index 5b3e5a01c..51440e073 100644
--- a/pd/src/g_editor.c
+++ b/pd/src/g_editor.c
@@ -3306,9 +3306,16 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
             int ninlet;
                 /* resize?  only for "true" text boxes, canvases, iemguis,
                    and -- using an awful hack-- for the Scope~ object
-                   by checking for the class name below */
+                   by checking for the class name below.
+
+                   One exception-- my_canvas. It has a weirdo interface
+                   where the visual dimensions usually (i.e., by default)
+                   extends well past the bounds of the bbox. For that reason
+                   we have a virtual waterfall of conditionals flowing all
+                   the way to the GUI just handle resizing a stupid rectangle.
+                */
             if (ob &&
-                   (ob->te_iemgui
+                   (ob->te_iemgui && pd_class((t_pd *)ob) != my_canvas_class
                        || pd_class(&ob->te_pd)->c_name == gensym("Scope~"))
                    && xpos >= x2-4 && ypos > y2-6)
             {
-- 
GitLab