From 4908fff5f7226bc3492751240ba5632bb7c5784d Mon Sep 17 00:00:00 2001
From: Ivica Ico Bukvic <ico@vt.edu>
Date: Sun, 22 Sep 2013 04:07:39 -0400
Subject: [PATCH] further refined cursor behavior when resizing text/gop
 objects.

---
 pd/src/g_editor.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/pd/src/g_editor.c b/pd/src/g_editor.c
index 1315e166d..3e2613bd8 100644
--- a/pd/src/g_editor.c
+++ b/pd/src/g_editor.c
@@ -2889,7 +2889,7 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
             if (!sys_k12_mode && ob && !x->gl_editor->e_textedfor &&
                 (ob->te_pd->c_wb == &text_widgetbehavior ||
                     ob->ob_pd == canvas_class) &&
-                        xpos >= x2-4 && ypos < y2-4)
+                        xpos >= x2-4 && ypos < y2-4 && ypos > y1+4)
             {
                 if (doit)
                 {
@@ -2987,6 +2987,7 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
                     // end jsarlo
                 }
                 else {
+                	canvas_setcursor(x, CURSOR_EDITMODE_NOTHING);
 					canvas_check_nlet_highlights(x);
 					if (doit)
 	                    goto nooutletafterall;
@@ -2995,6 +2996,7 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
                 /* look for an inlet (these are colored differently since they are not connectable) */
             else if (ob && (ninlet = obj_ninlets(ob)) && ypos <= y1+4)
             {
+            	canvas_setcursor(x, CURSOR_EDITMODE_NOTHING);
                 int width = x2 - x1;
                 int nin1 = (ninlet > 1 ? ninlet - 1 : 1);
                 int closest = ((xpos-x1) * (nin1) + width/2)/width;
@@ -3035,8 +3037,9 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
 						}
 					}
 				} else {
-					if (x->gl_editor->e_onmotion != MA_CONNECT)
+					if (x->gl_editor->e_onmotion != MA_CONNECT) {
 						canvas_check_nlet_highlights(x);
+					}
 					if (doit)
 	                    goto nooutletafterall;
 				}
-- 
GitLab