diff options
-rwxr-xr-x | ChangeLog | 11 | ||||
-rw-r--r-- | generic/tkStubInit.c | 11 | ||||
-rw-r--r-- | generic/tkWindow.c | 25 |
3 files changed, 22 insertions, 25 deletions
@@ -1,3 +1,14 @@ +2012-04-26 Jan Nijtmans <nijtmans@users.sf.net> + + * generic/tk.decls: [Bug 3508771]: Implement TkClipBox, Tk*Region and + * generic/tkInt.decls: Tk_GetHINSTANCE for Cygwin + * generic/tkPlatDecls.h: + * generic/tkintDecls.h: + * generic/tkStubInit.c: + * unix/tcl.m4: For Cygwin, install tk84.dll in <prefix>/bin, not <prefix>/lib + * unix/configure: + * unix/Makefile.in: + 2012-04-22 Donal K. Fellows <dkf@users.sf.net> * generic/tkBind.c (ExpandPercents): [Bug 3520202]: Ensure that the diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index 89ae433..d37dd4c 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -48,8 +48,7 @@ #undef TkSetRegion #undef TkUnionRectWithRegion #undef TkSubtractRegion - -TkIntStubs tkIntStubs; +#undef TkPutImage #ifndef __WIN32__ /* Make sure that extensions which call XParseColor through @@ -77,6 +76,8 @@ TkIntStubs tkIntStubs; #define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS 0x00000004 int __stdcall GetModuleHandleExW(unsigned int, const char *, void *); +TkIntStubs tkIntStubs; + #define Tk_GetHINSTANCE TkPlatGetHINSTANCE static void *Tk_GetHINSTANCE() { @@ -85,9 +86,11 @@ static void *Tk_GetHINSTANCE() (const char *)&tkIntStubs, &hInstance); return hInstance; } -#else + +#else /* __CYGWIN__ */ # define Tk_GetHINSTANCE 0 -#endif +# define TkPutImage 0 +#endif /* __CYGWIN__ */ # endif /* !MAC_TCL && !MACC_OSX_TCL */ diff --git a/generic/tkWindow.c b/generic/tkWindow.c index a04777f..d3de72d 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -101,7 +101,6 @@ static CONST XSetWindowAttributes defAtts= { #define ISSAFE 1 #define PASSMAINWINDOW 2 -#define WINMACONLY 4 typedef struct { CONST char *name; /* Name of command. */ @@ -136,9 +135,9 @@ static CONST TkCmd commands[] = { {"tkwait", NULL, Tk_TkwaitObjCmd, PASSMAINWINDOW|ISSAFE}, #if defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK) {"tk_chooseColor", NULL, Tk_ChooseColorObjCmd, PASSMAINWINDOW}, - {"tk_chooseDirectory", NULL, Tk_ChooseDirectoryObjCmd, WINMACONLY|PASSMAINWINDOW}, - {"tk_getOpenFile", NULL, Tk_GetOpenFileObjCmd, WINMACONLY|PASSMAINWINDOW}, - {"tk_getSaveFile", NULL, Tk_GetSaveFileObjCmd, WINMACONLY|PASSMAINWINDOW}, + {"tk_chooseDirectory", NULL, Tk_ChooseDirectoryObjCmd, PASSMAINWINDOW}, + {"tk_getOpenFile", NULL, Tk_GetOpenFileObjCmd, PASSMAINWINDOW}, + {"tk_getSaveFile", NULL, Tk_GetSaveFileObjCmd, PASSMAINWINDOW}, #endif #if defined(__WIN32__) || defined(MAC_OSX_TK) {"tk_messageBox", NULL, Tk_MessageBoxObjCmd, PASSMAINWINDOW}, @@ -852,9 +851,6 @@ TkCreateMainWindow(interp, screenName, baseName) Tk_Window tkwin; int dummy; int isSafe; -#ifdef __WIN32__ - int isWin32 = 0; -#endif Tcl_HashEntry *hPtr; register TkMainInfo *mainPtr; register TkWindow *winPtr; @@ -862,15 +858,7 @@ TkCreateMainWindow(interp, screenName, baseName) ClientData clientData; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); -#ifdef __WIN32__ - 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 the Tk_FakeWin structure (or vice versa). @@ -953,11 +941,6 @@ TkCreateMainWindow(interp, screenName, baseName) if ((cmdPtr->cmdProc == NULL) && (cmdPtr->objProc == NULL)) { Tcl_Panic("TkCreateMainWindow: builtin command with NULL string and object procs"); } -#ifdef __WIN32__ - if (!isWin32 && (cmdPtr->flags & WINMACONLY)) { - continue; - } -#endif if (cmdPtr->flags & PASSMAINWINDOW) { clientData = (ClientData) tkwin; } else { |