Revision: 76925
          http://sourceforge.net/p/brlcad/code/76925
Author:   starseeker
Date:     2020-08-24 18:30:50 +0000 (Mon, 24 Aug 2020)
Log Message:
-----------
System Tcl/Tk doesn't like calling Tk_DeleteGenericHandler in classic mode with 
a non-Tk dm like txt.  Only do Tk event handler logic if the dm we open reports 
it is graphical.

Modified Paths:
--------------
    brlcad/trunk/src/mged/attach.c

Modified: brlcad/trunk/src/mged/attach.c
===================================================================
--- brlcad/trunk/src/mged/attach.c      2020-08-24 18:22:08 UTC (rev 76924)
+++ brlcad/trunk/src/mged/attach.c      2020-08-24 18:30:50 UTC (rev 76925)
@@ -87,10 +87,6 @@
     /* register application provided routines */
     cmd_hook = dm_commands;
 
-#ifdef HAVE_TK
-    Tk_DeleteGenericHandler(doEvent, (ClientData)NULL);
-#endif
-
     if ((DMP = dm_open((void *)INTERP, dm_type, argc-1, argv)) == DM_NULL)
        return TCL_ERROR;
 
@@ -99,7 +95,10 @@
     dm_set_perspective(DMP, mged_variables->mv_perspective_mode);
 
 #ifdef HAVE_TK
-    Tk_CreateGenericHandler(doEvent, (ClientData)NULL);
+    if (dm_graphical(DMP)) {
+       Tk_DeleteGenericHandler(doEvent, (ClientData)NULL);
+       Tk_CreateGenericHandler(doEvent, (ClientData)NULL);
+    }
 #endif
     (void)dm_configure_win(DMP, 0);
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to