[cairo-commit] cairo-demo/gameoflife cgolwin.cpp,1.1,1.2

Andrew Chant commit at pdx.freedesktop.org
Mon Nov 24 18:25:06 PST 2003


Committed by: chant

Update of /cvs/cairo/cairo-demo/gameoflife
In directory pdx:/tmp/cvs-serv955

Modified Files:
	cgolwin.cpp 
Log Message:
handle CreateNotify events resizing the window.


Index: cgolwin.cpp
===================================================================
RCS file: /cvs/cairo/cairo-demo/gameoflife/cgolwin.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** cgolwin.cpp	25 Nov 2003 02:06:56 -0000	1.1
--- cgolwin.cpp	25 Nov 2003 02:25:04 -0000	1.2
***************
*** 64,67 ****
--- 64,77 ----
  		}
  		break;
+ 	case CreateNotify:
+ 		width = ((XCreateWindowEvent *)e)->width;
+ 		height = ((XCreateWindowEvent *)e)->height;
+ 		if (grid != 0)
+ 		{
+ 			XFreePixmap(dpy, grid);
+ 			XFreePixmap(dpy, buffer);
+ 			buffer = grid = 0;
+ 		}
+ 		break;
  	case ConfigureNotify:
  		width = ((XConfigureEvent *)e)->width;





More information about the cairo-commit mailing list