summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2001-08-28 00:13:58 (GMT)
committerhobbs <hobbs>2001-08-28 00:13:58 (GMT)
commitd516272555edcafb9127477e682a8b8f965c39b2 (patch)
tree9cd69cde2ada87caa26d7b6d4837f83d89de1454
parentee7889471b8e0a6edcf4e5d7fc8c20c420f39dde (diff)
downloadtk-d516272555edcafb9127477e682a8b8f965c39b2.zip
tk-d516272555edcafb9127477e682a8b8f965c39b2.tar.gz
tk-d516272555edcafb9127477e682a8b8f965c39b2.tar.bz2
* generic/tkWindow.c (Initialize): added call to Tcl_SetMainLoop.
This only has effect when tclsh is run (not wish), and then Tk is loaded in interactively.
-rw-r--r--ChangeLog9
-rw-r--r--generic/tkWindow.c12
2 files changed, 20 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 2e44177..31a7e3a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
+2001-08-27 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * generic/tkWindow.c (Initialize): added call to Tcl_SetMainLoop.
+ This only has effect when tclsh is run (not wish), and then Tk is
+ loaded in interactively.
+
2001-08-24 Jeff Hobbs <jeffh@ActiveState.com>
+ * tests/unixFont.test (unixFont-2.[234]): fixed to be more
+ sensitive on systems that have more installed fonts.
+
* generic/tkWindow.c (Tk_DestroyWindow): changed to use
Tcl_EventuallyFree instead of ckfree so that widgets that have
references to a tkwin can use them.
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 9341a8b..f881c5b 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWindow.c,v 1.16.2.1 2001/08/24 23:57:59 hobbs Exp $
+ * RCS: @(#) $Id: tkWindow.c,v 1.16.2.2 2001/08/28 00:13:58 hobbs Exp $
*/
#include "tkPort.h"
@@ -2961,6 +2961,16 @@ Initialize(interp)
code = Tcl_PkgProvideEx(interp, "Tk", TK_VERSION, (ClientData) &tkStubs);
if (code != TCL_OK) {
goto done;
+ } else {
+ /*
+ * If we were able to provide ourselves as a package, then set
+ * the main loop procedure in Tcl to our main loop proc. This
+ * will cause tclsh to be event-aware when Tk is dynamically
+ * loaded. This will have no effect in wish, which already is
+ * prepared to run the event loop.
+ */
+
+ Tcl_SetMainLoop(Tk_MainLoop);
}
#ifdef Tk_InitStubs