aboutsummaryrefslogtreecommitdiff
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/Types.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/generic/Types.h b/generic/Types.h
index 948ea80..68efcd9 100644
--- a/generic/Types.h
+++ b/generic/Types.h
@@ -60,6 +60,9 @@
# include <tkPort.h>
# include <tkImgPhoto.h>
# include <tkVMacro.h>
+# ifndef PTK_800
+# define Arg Tcl_Obj *
+# endif
#else
# include <tkDecls.h>
# include <tkIntDecls.h>
@@ -112,7 +115,7 @@ typedef void *ZnPtr;
# define TCL_INTEGER_SPACE 24
#endif
-#ifdef PTK
+#ifdef PTK_800
/*
* Macros for Tk8.4/perl/Tk utf compatibility
*/
@@ -198,7 +201,9 @@ EXTERN TkRegion ZnPolygonRegion(XPoint *points, int n,
# ifdef GL
# define ZnGLContext GLXContext
# define ZnGLMakeCurrent(wi) \
- glXMakeCurrent(wi->dpy, Tk_WindowId(wi->win), wi->gl_context);
+ glXMakeCurrent(wi->dpy, \
+ wi->win ? Tk_WindowId(wi->win) : RootWindowOfScreen(wi->screen), \
+ wi->gl_context)
# define ZnGLRelease(wi)
# define ZnGLDestroyContext(wi) \
glXDestroyContext(wi->dpy, wi->gl_context);