[cig-commits] commit: Mac OS X 10.6 fix for X11 window: GLX context incorrectly set to NULL

Mercurial hg at geodynamics.org
Tue Mar 23 10:36:17 PDT 2010


changeset:   217:98e47db94859
branch:      1.4.x
tag:         1.4.0
user:        Owen Kaluza <Owen.Kaluza at sci.monash.edu.au>
date:        Fri Jan 29 16:48:29 2010 +1100
files:       Windowing/src/X11Window.c
description:
Mac OS X 10.6 fix for X11 window: GLX context incorrectly set to NULL


diff -r 6f2e9eea6983 -r 98e47db94859 Windowing/src/X11Window.c
--- a/Windowing/src/X11Window.c	Fri Jan 29 12:49:37 2010 +1100
+++ b/Windowing/src/X11Window.c	Fri Jan 29 16:48:29 2010 +1100
@@ -196,7 +196,7 @@ void _lucX11Window_Execute( void* window
 	if (self->interactive && self->isMaster)
     {
 		glXMakeCurrent( self->display, self->win, self->glxcontext);
-        XSetInputFocus(self->display, self->win, RevertToParent, CurrentTime);
+      //XSetInputFocus(self->display, self->win, RevertToParent, CurrentTime);
     }
     else 
         glXMakeCurrent( self->display, self->glxpmap, self->glxcontext);
@@ -220,7 +220,8 @@ void _lucX11Window_Destroy( void* window
 	XFree( self->vi );
 	self->vi = 0;
 
-	glXDestroyContext( self->display,  self->glxcontext);
+	if (self->glxcontext) 
+	   glXDestroyContext( self->display,  self->glxcontext);
 	self->glxcontext = 0;
 
 	XSetCloseDownMode( self->display,  DestroyAll);
@@ -318,15 +319,15 @@ void _lucX11Window_Resize( void* window 
     /* Master window resized? Create new background pixmap of required size */
     if (self->interactive && !self->isMaster)
     {
-    	lucX11Window_CloseBackgroundWindow( self );
-   		lucX11Window_CreateBackgroundWindow( self );
+      lucX11Window_CloseBackgroundWindow( self );
+      lucX11Window_CreateBackgroundWindow( self );
     }
 
 	/* Close window and create background window if switched out of interactive mode */
 	if (!self->interactive)
 	{
-		lucX11Window_CloseInteractiveWindow( self );
-		lucX11Window_CreateBackgroundWindow( self );
+      lucX11Window_CloseInteractiveWindow( self );
+      lucX11Window_CreateBackgroundWindow( self );
 		self->quitEventLoop = True;
 	}
 
@@ -567,7 +568,6 @@ void lucX11Window_CloseInteractiveWindow
 
 	XDestroyWindow( self->display , self->win );
 	self->win = 0;
-    self->glxcontext = NULL;
 
 	lucDebug_PrintFunctionEnd( self, 1 );
 }
@@ -580,7 +580,6 @@ void lucX11Window_CloseBackgroundWindow(
 	self->glxpmap = 0;
 	XFreePixmap(self->display, self->pmap);
 	self->pmap = 0;
-    self->glxcontext = NULL;
 
 	lucDebug_PrintFunctionEnd( self, 1 );
 }



More information about the CIG-COMMITS mailing list