From 19aa32ad9150ea72194b6232aed5836616c2fbd2 Mon Sep 17 00:00:00 2001
From: Ivica Ico Bukvic <ico@vt.edu>
Date: Sat, 22 Jun 2013 15:10:17 -0400
Subject: [PATCH] improved focus logic when opening a new patch

---
 pd/src/pd.tk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pd/src/pd.tk b/pd/src/pd.tk
index 22792b396..02c0e3859 100644
--- a/pd/src/pd.tk
+++ b/pd/src/pd.tk
@@ -3083,7 +3083,7 @@ proc pdtk_canvas_new {name width height geometry editable} {
 	bind $name <FocusIn> "menu_fixeditmenu $name"
 	# bind $name <FocusOut> { pdtk_noselect %W }
 	if { $k12_mode == 1 } { pd [concat $name tooltips 1 \;] }
-    focus $name.c
+    after 100 [concat focus $name.c]
 
 	if { $k12_mode == 1 && $k12_saveas_on_new == 1 } {
 		after 1000 [concat pdtk_k12_saveas_on_new $name]
-- 
GitLab