aboutsummaryrefslogtreecommitdiff
path: root/generic
diff options
context:
space:
mode:
authorlecoanet2004-03-03 16:36:50 +0000
committerlecoanet2004-03-03 16:36:50 +0000
commitf1f4afa861b9f89866d812449fe981ae21aea60d (patch)
tree1337e02b51ef49d392a9032b79e6d6ff02e8afa6 /generic
parent0d41dbff273f9f13cee9208944212e4592cbf5ee (diff)
downloadtkzinc-f1f4afa861b9f89866d812449fe981ae21aea60d.zip
tkzinc-f1f4afa861b9f89866d812449fe981ae21aea60d.tar.gz
tkzinc-f1f4afa861b9f89866d812449fe981ae21aea60d.tar.bz2
tkzinc-f1f4afa861b9f89866d812449fe981ae21aea60d.tar.xz
Changes for perl/Tk 804.
Fix a problem with glXMakeCurrent when the widget window is gone, the root window is used instead. This fixes a problem when freeing textures for an already destroyed widget.
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);