summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authornijtmans@users.sourceforge.net <jan.nijtmans>2012-05-05 17:16:17 (GMT)
committernijtmans@users.sourceforge.net <jan.nijtmans>2012-05-05 17:16:17 (GMT)
commit4d1fdf3835f593b08205dc077ce91f707fd5ed5c (patch)
treeb84287c5dcb8f44a6ca6aa867defb43d89c0fd11 /generic
parentd7859a8356e2a1ac668965050044fb3ff1d00711 (diff)
parentc7e1cf6eaf9f1629505b112a0081b4fed7c6fd45 (diff)
downloadtk-4d1fdf3835f593b08205dc077ce91f707fd5ed5c.zip
tk-4d1fdf3835f593b08205dc077ce91f707fd5ed5c.tar.gz
tk-4d1fdf3835f593b08205dc077ce91f707fd5ed5c.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 */