summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <jan.nijtmans@noemail.net>2012-07-04 12:33:23 (GMT)
committerjan.nijtmans <jan.nijtmans@noemail.net>2012-07-04 12:33:23 (GMT)
commit87c9ce48409741335059314cd02c19e362f48d7c (patch)
treedb14ace0d9937f7cc569e241d71d9b303a8e0aa5 /win
parent7d3533e08636b01ac38b00142f51dfcc71822cd8 (diff)
parentf594c1c764f7d20fda04957e61280e48f5c1f18c (diff)
downloadtk-87c9ce48409741335059314cd02c19e362f48d7c.zip
tk-87c9ce48409741335059314cd02c19e362f48d7c.tar.gz
tk-87c9ce48409741335059314cd02c19e362f48d7c.tar.bz2
Add various X11 stub functions, Cygwin only
remove TkBindDeadWindow from Cygwin stub table [Bug 3540127]: filebox.test fails on win32 FossilOrigin-Name: e8da45ebc0c90888e14515544e07f6a455178c1d
Diffstat (limited to 'win')
-rw-r--r--win/tkWinDialog.c21
-rw-r--r--win/tkWinPort.h13
2 files changed, 11 insertions, 23 deletions
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c
index 55152e9..5d9d82f 100644
--- a/win/tkWinDialog.c
+++ b/win/tkWinDialog.c
@@ -603,21 +603,16 @@ GetFileNameW(
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
static CONST char *saveOptionStrings[] = {
- "-defaultextension", "-filetypes", "-initialdir", "-initialfile",
- "-parent", "-title", "-typevariable",
- "-confirmoverwrite",
- NULL
+ "-confirmoverwrite", "-defaultextension", "-filetypes", "-initialdir",
+ "-initialfile", "-parent", "-title", "-typevariable", NULL
};
static CONST char *openOptionStrings[] = {
"-defaultextension", "-filetypes", "-initialdir", "-initialfile",
- "-parent", "-title", "-typevariable",
- "-multiple",
- NULL
+ "-multiple", "-parent", "-title", "-typevariable", NULL
};
enum options {
- FILE_DEFAULT, FILE_TYPES, FILE_INITDIR, FILE_INITFILE,
- FILE_PARENT, FILE_TITLE, FILE_TYPEVARIABLE,
- FILE_MULTIPLE_OR_CONFIRMOW
+ FILE_MULTIPLE_OR_CONFIRMOW, FILE_DEFAULT, FILE_TYPES, FILE_INITDIR,
+ FILE_INITFILE, FILE_PARENT, FILE_TITLE, FILE_TYPEVARIABLE
};
file[0] = '\0';
@@ -638,6 +633,12 @@ GetFileNameW(
"option", 0, &index) != TCL_OK) {
goto end;
}
+ /* Compensate for the "openOptionStrings" having different ordering [Bug #3540127] */
+ if (open && (index < FILE_PARENT)) {
+ if (++index > FILE_INITFILE) {
+ index = FILE_MULTIPLE_OR_CONFIRMOW;
+ }
+ }
if (i + 1 == objc) {
string = Tcl_GetString(optionPtr);
diff --git a/win/tkWinPort.h b/win/tkWinPort.h
index 83b67c6..14f949c 100644
--- a/win/tkWinPort.h
+++ b/win/tkWinPort.h
@@ -97,19 +97,6 @@
#define TkFreeWindowId(dispPtr,w)
#define TkInitXId(dispPtr)
-#define XFlush(display)
-#define XGrabServer(display)
-#define XUngrabServer(display)
-
-/*
- * The following functions are implemented as macros under Windows.
- */
-
-#define XFree(data) {if ((data) != NULL) ckfree((char *) (data));}
-#define XNoOp(display) {display->request++;}
-#define XSynchronize(display, bool) {display->request++;}
-#define XSync(display, bool) {display->request++;}
-#define XVisualIDFromVisual(visual) (visual->visualid)
/*
* The following Tk functions are implemented as macros under Windows.