summaryrefslogtreecommitdiffstats
path: root/generic/tkMain.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-08 22:47:55 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-08 22:47:55 (GMT)
commit8409ff09f08fd2b2ef22585bb9559ee6930d4d5f (patch)
tree8085e4e968c883798ec985c45f94065fe230ee15 /generic/tkMain.c
parent676eb78eadce63bc5b6a98b6c1f2d077b49a9869 (diff)
parent79fa64792bbab42e97785552b9a9cf75fa126695 (diff)
downloadtk-8409ff09f08fd2b2ef22585bb9559ee6930d4d5f.zip
tk-8409ff09f08fd2b2ef22585bb9559ee6930d4d5f.tar.gz
tk-8409ff09f08fd2b2ef22585bb9559ee6930d4d5f.tar.bz2
Change XChangeWindowAttributes signature and many others to match Xorg, needed for Cygwin
Diffstat (limited to 'generic/tkMain.c')
-rw-r--r--generic/tkMain.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/generic/tkMain.c b/generic/tkMain.c
index 03e74b0..9fd2f69 100644
--- a/generic/tkMain.c
+++ b/generic/tkMain.c
@@ -39,6 +39,8 @@
# include <stdlib.h>
#endif
+extern int TkCygwinMainEx(int, char **, Tcl_AppInitProc *, Tcl_Interp *);
+
/*
* The default prompt used when the user has not overridden it.
*/
@@ -190,15 +192,19 @@ Tk_MainEx(
abort();
}
-#if defined(__WIN32__) && !defined(STATIC_BUILD)
+#if defined(__WIN32__) && !defined(__WIN64__) && !defined(UNICODE) && !defined(STATIC_BUILD)
+
if (tclStubsPtr->reserved9) {
/* We are running win32 Tk under Cygwin, so let's check
* whether the env("DISPLAY") variable or the -display
* argument is set. If so, we really want to run the
- * Tk_MainEx function of libtk.dll, not this one. */
- if (Tcl_GetVar2(interp, "env", "DISPLAY", TCL_GLOBAL_ONLY)) {
+ * Tk_MainEx function of libtk8.?.dll, not this one. */
+ if (Tcl_GetVar2(interp, "env", "DISPLAY", TCL_GLOBAL_ONLY)) {
loadCygwinTk:
- Tcl_Panic("Should load libtk.dll now, not yet implemented");
+ if (TkCygwinMainEx(argc, argv, appInitProc, interp)) {
+ /* Should never reach here. */
+ return;
+ }
} else {
int i;