summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-05-05 17:16:17 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-05-05 17:16:17 (GMT)
commit07212f98d3048b772094a64325e930e1c0364964 (patch)
treeb84287c5dcb8f44a6ca6aa867defb43d89c0fd11 /generic
parentacfb83993a6266257e059e30e5dffde280882c11 (diff)
parent89dda440e266b894bf853efa4fedcad7f19befa5 (diff)
downloadtk-07212f98d3048b772094a64325e930e1c0364964.zip
tk-07212f98d3048b772094a64325e930e1c0364964.tar.gz
tk-07212f98d3048b772094a64325e930e1c0364964.tar.bz2
merge core-8-4-branch
Diffstat (limited to 'generic')
-rw-r--r--generic/tkBind.c8
-rw-r--r--generic/tkIntXlibDecls.h6
-rw-r--r--generic/tkStubInit.c12
3 files changed, 12 insertions, 14 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c
index fc212cb..3003f18 100644
--- a/generic/tkBind.c
+++ b/generic/tkBind.c
@@ -2625,21 +2625,13 @@ ExpandPercents(winPtr, before, eventPtr, keySym, dsPtr)
}
case 'X':
if (flags & KEY_BUTTON_MOTION_CROSSING) {
- Tk_Window tkwin;
-
number = eventPtr->xkey.x_root;
- tkwin = Tk_IdToWindow(eventPtr->xany.display,
- eventPtr->xany.window);
goto doNumber;
}
goto doString;
case 'Y':
if (flags & KEY_BUTTON_MOTION_CROSSING) {
- Tk_Window tkwin;
-
number = eventPtr->xkey.y_root;
- tkwin = Tk_IdToWindow(eventPtr->xany.display,
- eventPtr->xany.window);
goto doNumber;
}
goto doString;
diff --git a/generic/tkIntXlibDecls.h b/generic/tkIntXlibDecls.h
index a79278d..177e0c4 100644
--- a/generic/tkIntXlibDecls.h
+++ b/generic/tkIntXlibDecls.h
@@ -36,7 +36,7 @@
* Exported function declarations:
*/
-#ifdef __WIN32__
+#if defined(__WIN32__) || defined(__CYGWIN__)
/* 0 */
EXTERN int XSetDashes _ANSI_ARGS_((Display *display, GC gc,
int dash_offset, _Xconst char *dash_list,
@@ -951,7 +951,7 @@ typedef struct TkIntXlibStubs {
int magic;
struct TkIntXlibStubHooks *hooks;
-#ifdef __WIN32__
+#if defined(__WIN32__) || defined(__CYGWIN__)
int (*xSetDashes) _ANSI_ARGS_((Display *display, GC gc, int dash_offset, _Xconst char *dash_list, int n)); /* 0 */
XModifierKeymap * (*xGetModifierMapping) _ANSI_ARGS_((Display *d)); /* 1 */
XImage * (*xCreateImage) _ANSI_ARGS_((Display *d, Visual *v, unsigned int ui1, int i1, int i2, char *cp, unsigned int ui2, unsigned int ui3, int i3, int i4)); /* 2 */
@@ -1263,7 +1263,7 @@ extern TkIntXlibStubs *tkIntXlibStubsPtr;
* Inline function declarations:
*/
-#ifdef __WIN32__
+#if defined(__WIN32__) || defined(__CYGWIN__)
#ifndef XSetDashes
#define XSetDashes \
(tkIntXlibStubsPtr->xSetDashes) /* 0 */
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index 22334bc..d4f7d79 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -76,6 +76,7 @@
# define TkSubtractRegion (void (*) _ANSI_ARGS_((TkRegion, TkRegion, TkRegion))) XSubtractRegion
# ifdef __CYGWIN__
+# define TkPutImage TkIntXlibPutImage
# define Tk_GetHINSTANCE TkPlatGetHINSTANCE
# define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS 0x00000004
@@ -96,6 +97,13 @@ static void *Tk_GetHINSTANCE()
(const char *) &tkIntStubs, &hInstance);
return hInstance;
}
+static void TkPutImage(unsigned long *colors, int ncolors, Display *display,
+ Drawable d, GC gc, XImage *image, int destx, int desty,
+ int srcx, int srcy, unsigned int width, unsigned int height)
+{
+ XPutImage(display, d, gc, image, destx, desty, srcx, srcy, width, height);
+}
+
/* TODO: To be implemented for Cygwin */
# define Tk_AttachHWND 0
# define Tk_GetHWND 0
@@ -103,8 +111,6 @@ static void *Tk_GetHINSTANCE()
# define Tk_PointerEvent 0
# define Tk_TranslateWinEvent 0
-# else /* !__CYGWIN__ */
-# define TkPutImage 0
# endif /* __CYGWIN__ */
# endif /* !MAC_TCL && !MACC_OSX_TCL */
#endif /* !__WIN32__ */
@@ -494,7 +500,7 @@ TkIntPlatStubs tkIntPlatStubs = {
TkIntXlibStubs tkIntXlibStubs = {
TCL_STUB_MAGIC,
NULL,
-#ifdef __WIN32__
+#if defined(__WIN32__) || defined(__CYGWIN__)
XSetDashes, /* 0 */
XGetModifierMapping, /* 1 */
XCreateImage, /* 2 */