summaryrefslogtreecommitdiffstats
path: root/generic/tkWindow.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkWindow.c')
-rw-r--r--generic/tkWindow.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 278c8bc..b2c5310 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -14,7 +14,9 @@
#include "tkInt.h"
-#if !(defined(__WIN32__) || defined(MAC_OSX_TK))
+#ifdef __WIN32__
+#include "tkWinInt.h"
+#elif !(defined(__WIN32__) || defined(__CYGWIN__) || defined(MAC_OSX_TK))
#include "tkUnixInt.h"
#endif
@@ -859,9 +861,6 @@ TkCreateMainWindow(
{
Tk_Window tkwin;
int dummy, isSafe;
-#if defined(__WIN32__) && !defined(STATIC_BUILD)
- int isWin32 = 0;
-#endif
Tcl_HashEntry *hPtr;
register TkMainInfo *mainPtr;
register TkWindow *winPtr;
@@ -869,14 +868,6 @@ TkCreateMainWindow(
ClientData clientData;
ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
-#if defined(__WIN32__) && !defined(STATIC_BUILD)
- Tcl_Obj *stringObjPtr = Tcl_GetVar2Ex(interp, "::tcl_platform", "platform", 0);
-
- if (stringObjPtr
- && !strcmp(Tcl_GetString(stringObjPtr), "windows")) {
- isWin32 = 1;
- }
-#endif
/*
* Panic if someone updated the TkWindow structure without also updating
@@ -962,7 +953,8 @@ TkCreateMainWindow(
Tcl_Panic("TkCreateMainWindow: builtin command with NULL string and object procs");
}
#if defined(__WIN32__) && !defined(STATIC_BUILD)
- if (!isWin32 && (cmdPtr->flags & WINMACONLY)) {
+ if ((cmdPtr->flags & WINMACONLY) && tclStubsPtr->reserved9) {
+ /* We are running on Cygwin, so don't use the win32 dialogs */
continue;
}
#endif