Index: src/do_zoom.c =================================================================== RCS file: /grassrepository/grass/src.contrib/GMSL/NVIZ2.2/src/do_zoom.c,v retrieving revision 1.6 diff -u -r1.6 do_zoom.c --- src/do_zoom.c 10 Aug 2004 15:32:27 -0000 1.6 +++ src/do_zoom.c 24 Aug 2004 19:58:36 -0000 @@ -29,7 +29,6 @@ static Display *dpy; static Window root; -static GLXDrawable xdraw; static GLXContext ctx_orig; #ifdef HAVE_PBUFFERS static GLXPbuffer pbuffer; @@ -260,11 +259,6 @@ scr = DefaultScreen(dpy); root = RootWindow(dpy, scr); - xdraw = glXGetCurrentDrawable(); - if (xdraw == None) { - fprintf(stderr, "Unable to get current drawable\n"); - return (-1); - } ctx_orig = glXGetCurrentContext(); if (ctx_orig == NULL) { fprintf(stderr, "Unable to get current context\n"); @@ -358,12 +352,9 @@ if (pbuffer) { fprintf(stderr, "GLX -- destroy pbuffer\n"); + glXMakeCurrent(dpy, None, NULL); glXDestroyPbuffer(dpy, pbuffer); pbuffer = None; - glXMakeCurrent(dpy, xdraw, ctx_orig); - /* - glXMakeContextCurrent(dpy, xdraw, xdraw, ctx_orig); - */ GS_set_swap_func(swap_togl); return (1); } @@ -372,11 +363,11 @@ if (glxpixmap) { fprintf(stderr, "Destroy Pixmap and GLXPixmap\n"); - XFreePixmap(dpy, pixmap); - pixmap = None; + glXMakeCurrent(dpy, None, NULL); glXDestroyGLXPixmap(dpy, glxpixmap); glxpixmap = None; - glXMakeCurrent(dpy, xdraw, ctx_orig); + XFreePixmap(dpy, pixmap); + pixmap = None; GS_set_swap_func(swap_togl); return (1); } Index: scripts/nviz2.2_script =================================================================== RCS file: /grassrepository/grass/src.contrib/GMSL/NVIZ2.2/scripts/nviz2.2_script,v retrieving revision 1.13 diff -u -r1.13 nviz2.2_script --- scripts/nviz2.2_script 10 Nov 2003 14:42:49 -0000 1.13 +++ scripts/nviz2.2_script 24 Aug 2004 19:58:36 -0000 @@ -309,6 +309,7 @@ if {$fname != -1} then { appBusy Nstart_zoom $fname [winfo screenwidth .] [winfo screenheight .] + .top.canvas makecurrent appNotBusy } } -underline 0 -label "Save Max. Resolution PPM(s)"