diff -Naur gtkglext-1.2.0.orig/gdk/gdkglwindow.c gtkglext-1.2.0/gdk/gdkglwindow.c
--- gtkglext-1.2.0.orig/gdk/gdkglwindow.c	2004-02-20 10:38:12.000000000 +0100
+++ gtkglext-1.2.0/gdk/gdkglwindow.c	2010-05-22 19:16:57.000000000 +0200
@@ -704,7 +704,8 @@
  **/
 GdkGLWindow *
 gdk_window_set_gl_capability (GdkWindow   *window,
-                              GdkGLConfig *glconfig,
+                              myGtkAllocation *allocation,
+			      GdkGLConfig *glconfig,
                               const int   *attrib_list)
 {
   GdkGLWindow *glwindow;
@@ -726,7 +727,7 @@
    * Create GdkGLWindow
    */
 
-  glwindow = gdk_gl_window_new (glconfig, window, attrib_list);
+  glwindow = gdk_gl_window_new (glconfig, window, allocation, attrib_list);
   if (glwindow == NULL)
     {
       g_warning ("cannot create GdkGLWindow\n");
diff -Naur gtkglext-1.2.0.orig/gdk/gdkglwindow.h gtkglext-1.2.0/gdk/gdkglwindow.h
--- gtkglext-1.2.0.orig/gdk/gdkglwindow.h	2004-02-20 10:38:12.000000000 +0100
+++ gtkglext-1.2.0/gdk/gdkglwindow.h	2010-05-22 19:16:57.000000000 +0200
@@ -24,6 +24,13 @@
 
 #include <gdk/gdkwindow.h>
 
+typedef struct _GtkAllocation {
+  gint x;
+  gint y;
+  gint width;
+  gint height;
+} myGtkAllocation;
+
 G_BEGIN_DECLS
 
 typedef struct _GdkGLWindowClass GdkGLWindowClass;
@@ -54,8 +61,9 @@
  * (first attribute of None). See GLX 1.3 spec.
  */
 GdkGLWindow *gdk_gl_window_new              (GdkGLConfig *glconfig,
-                                             GdkWindow   *window,
-                                             const int   *attrib_list);
+                                            GdkWindow   *window,
+					    myGtkAllocation *viewport, 
+					    const int   *attrib_list);
 
 void         gdk_gl_window_destroy          (GdkGLWindow *glwindow);
 
@@ -63,10 +71,11 @@
 
 /*
  * OpenGL extension to GdkWindow
- */
+*/
 
 GdkGLWindow *gdk_window_set_gl_capability   (GdkWindow   *window,
-                                             GdkGLConfig *glconfig,
+                        		     myGtkAllocation *allocation,	
+			                     GdkGLConfig *glconfig,
                                              const int   *attrib_list);
 
 void         gdk_window_unset_gl_capability (GdkWindow   *window);
diff -Naur gtkglext-1.2.0.orig/gdk/quartz/gdkglcontext-quartz.c gtkglext-1.2.0/gdk/quartz/gdkglcontext-quartz.c
--- gtkglext-1.2.0.orig/gdk/quartz/gdkglcontext-quartz.c	2010-05-22 19:50:07.000000000 +0200
+++ gtkglext-1.2.0/gdk/quartz/gdkglcontext-quartz.c	2010-05-22 19:12:25.000000000 +0200
@@ -291,6 +291,7 @@
 	GdkGLContextImplQuartz *share_impl = NULL;
 	NSOpenGLContext *quartzContext;
 	NSOpenGLPixelFormatAttribute attribs[] = {0};
+	NSOpenGLView *quartzOGLView;
 	NSView *quartzView;
 	GDK_GL_NOTE_FUNC_PRIVATE ();
 	NSOpenGLPixelFormat *quartzPixelFormat;
@@ -318,7 +319,12 @@
 	if(GDK_IS_GL_WINDOW_IMPL_QUARTZ(gldrawable))
 	{
 	GDK_GL_WINDOW_IMPL_QUARTZ (gldrawable)->quartzContext = quartzContext;
-	quartzView = GDK_GL_WINDOW_IMPL_QUARTZ (gldrawable)->quartzView;
+	quartzView = GDK_GL_WINDOW_IMPL_QUARTZ (gldrawable)->quartzView;		
+	quartzOGLView = GDK_GL_WINDOW_IMPL_QUARTZ (gldrawable)->quartzOGLView;
+ 
+	[quartzOGLView setOpenGLContext:quartzContext];
+	[quartzContext setView:quartzOGLView];
+
 	[[NSNotificationCenter defaultCenter] 
 		 addObserver:quartzContext
 		 selector: @selector(update)
@@ -360,4 +366,4 @@
 {
 	return (a == b);
 }
-#endif
\ No newline at end of file
+#endif
diff -Naur gtkglext-1.2.0.orig/gdk/quartz/gdkglwindow-quartz.c gtkglext-1.2.0/gdk/quartz/gdkglwindow-quartz.c
--- gtkglext-1.2.0.orig/gdk/quartz/gdkglwindow-quartz.c	2010-05-22 19:50:07.000000000 +0200
+++ gtkglext-1.2.0/gdk/quartz/gdkglwindow-quartz.c	2010-05-22 19:12:25.000000000 +0200
@@ -113,26 +113,36 @@
 	iface->gl_begin             =  gdk_gl_window_impl_quartz_gl_begin;
 	iface->gl_end               =  gdk_gl_window_impl_quartz_gl_end;
 	iface->get_gl_config        =  gdk_gl_window_impl_quartz_get_gl_config;
-	iface->get_size             = _gdk_gl_window_get_size;
+	iface->get_size             =  _gdk_gl_window_get_size;
 }
 
+NSOpenGLView *gdk_quartz_window_nsoglview_new(NSView *myView, NSOpenGLPixelFormat *myFormat) {
+	NSOpenGLView *myOGLView;
+	myOGLView = [[NSOpenGLView alloc] initWithFrame:NSZeroRect pixelFormat:myFormat];
+	[myView addSubview:myOGLView];
+	return myOGLView;
+}
 
 GdkGLWindow *
 gdk_gl_window_new (GdkGLConfig *glconfig,
                    GdkWindow   *window,
+		   myGtkAllocation *allocation,
                    const int   *attrib_list)
 {
 	GdkGLWindow *glwindow;
 	GdkGLWindowImplQuartz *impl;
 	NSView *quartzView;
+	NSOpenGLView *quartzOGLView;
 	
 	GDK_GL_NOTE_FUNC ();
 	
 	g_return_val_if_fail (GDK_IS_GL_CONFIG_IMPL_QUARTZ (glconfig), NULL);
 	g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
-	
-	quartzView = gdk_quartz_window_get_nsview(window);
 
+	GdkGLConfigImplQuartz *glQuartzConfig = GDK_GL_CONFIG_IMPL_QUARTZ(glconfig) ;
+
+	quartzView = gdk_quartz_window_get_nsview(window);
+	quartzOGLView = gdk_quartz_window_nsoglview_new(quartzView, glQuartzConfig->quartzPixelFormat);
 	
 	glwindow = g_object_new (GDK_TYPE_GL_WINDOW_IMPL_QUARTZ, NULL);
 	impl = GDK_GL_WINDOW_IMPL_QUARTZ (glwindow);
@@ -141,12 +151,13 @@
 	g_object_add_weak_pointer (G_OBJECT (glwindow->drawable),
 							   (gpointer *) &(glwindow->drawable));
 	
-	
 	impl->glconfig = glconfig;
 	g_object_ref (G_OBJECT (impl->glconfig));
-	
+
+	impl->viewSize = allocation;	
 	impl->quartzView = quartzView;
-	
+	impl->quartzOGLView = quartzOGLView;	
+
 	impl->is_destroyed = FALSE;
 	
 	return glwindow;
@@ -181,11 +192,28 @@
 																   GdkGLContext  *glcontext)
 {
 	NSOpenGLContext *quartzContext = GDK_GL_CONTEXT_IMPL_QUARTZ(glcontext)->quartzContext; 
-	NSView			*view = GDK_GL_WINDOW_IMPL_QUARTZ (draw)->quartzView;
-	gboolean		ret=gdk_gl_window_impl_quartz_make_context_current (draw, read, glcontext);
+	NSOpenGLView			*view = GDK_GL_WINDOW_IMPL_QUARTZ (draw)->quartzOGLView;
+	
+	myGtkAllocation *oglViewSize = GDK_GL_WINDOW_IMPL_QUARTZ (draw)->viewSize;
+	myGtkAllocation	*myCurView = &(GDK_GL_WINDOW_IMPL_QUARTZ (draw)->currentView);
+	
+	if((oglViewSize->x != myCurView->x) || (oglViewSize->y != myCurView->y) || 
+	   (oglViewSize->width != myCurView->width) || (oglViewSize->height != myCurView->height)) {
+	   	
+	   myCurView->x = oglViewSize->x;
+           myCurView->y = oglViewSize->y;
+           myCurView->width = oglViewSize->width;
+           myCurView->height = oglViewSize->height;
+
+           NSRect myOGLView = NSMakeRect(oglViewSize->x, oglViewSize->y, oglViewSize->width, oglViewSize->height);
+           [view setFrame:myOGLView];
+	}
+	
+	gboolean ret=gdk_gl_window_impl_quartz_make_context_current (draw, read, glcontext);
 	if (([quartzContext view] != view) && ![view isHidden]) {
-        [quartzContext setView:view];
-    }
+           [quartzContext setView:view];
+    	}
+	
 	return ret;
 }
 
@@ -201,4 +229,4 @@
 	g_return_val_if_fail (GDK_IS_GL_WINDOW_IMPL_QUARTZ(gldrawable), NULL);
 	
 	return GDK_GL_WINDOW_IMPL_QUARTZ (gldrawable)->glconfig;
-}
\ No newline at end of file
+}
diff -Naur gtkglext-1.2.0.orig/gdk/quartz/gdkglwindow-quartz.h gtkglext-1.2.0/gdk/quartz/gdkglwindow-quartz.h
--- gtkglext-1.2.0.orig/gdk/quartz/gdkglwindow-quartz.h	2010-05-22 19:50:07.000000000 +0200
+++ gtkglext-1.2.0/gdk/quartz/gdkglwindow-quartz.h	2010-05-22 19:12:25.000000000 +0200
@@ -4,6 +4,8 @@
 #include <gdk/gdkglwindow.h>
 #include <gdk/quartz/gdkglquartz.h>
 
+NSOpenGLView *gdk_quartz_window_nsoglview_new(NSView *myView, NSOpenGLPixelFormat *myFormat);
+
 G_BEGIN_DECLS
 										     
 typedef struct _GdkGLWindowImplQuartz      GdkGLWindowImplQuartz;
@@ -20,8 +22,11 @@
 	{
 		GdkGLWindow parent_instance;
 		
-		NSView				*quartzView;
+		NSView			*quartzView;
+		NSOpenGLView		*quartzOGLView;
 		NSOpenGLContext		*quartzContext;
+		myGtkAllocation		*viewSize;		
+		myGtkAllocation		currentView;
 		
 		GdkGLConfig *glconfig;
 		
@@ -38,4 +43,4 @@
 G_END_DECLS
 
 
-#endif
\ No newline at end of file
+#endif
diff -Naur gtkglext-1.2.0.orig/gtk/gtkglwidget.c gtkglext-1.2.0/gtk/gtkglwidget.c
--- gtkglext-1.2.0.orig/gtk/gtkglwidget.c	2004-02-20 10:38:36.000000000 +0100
+++ gtkglext-1.2.0/gtk/gtkglwidget.c	2010-05-22 19:17:35.000000000 +0200
@@ -80,7 +80,8 @@
   if (!gdk_window_is_gl_capable (widget->window))
     {
       glwindow = gdk_window_set_gl_capability (widget->window,
-                                               private->glconfig,
+					       ((myGtkAllocation*)&(widget->allocation)),	                                               
+					       private->glconfig,
                                                NULL);
       if (glwindow == NULL)
         {
