From: Andy Spencer Date: Thu, 18 Nov 2010 07:07:54 +0000 (+0000) Subject: Avoid executing "configure" until after realize X-Git-Url: http://pileus.org/git/?a=commitdiff_plain;h=dd793d5eb5f129d28a6177e8425f9afcc9a724b6;hp=69d6b0820471501771d0f520e41a5635fcab2e2d;p=grits Avoid executing "configure" until after realize This is a hack, a better solution is in 0.5.x. This fixes a bug when using Mesa. --- diff --git a/src/gis-opengl.c b/src/gis-opengl.c index ecbf47a..9deb006 100644 --- a/src/gis-opengl.c +++ b/src/gis-opengl.c @@ -381,6 +381,10 @@ static gboolean on_configure(GisOpenGL *opengl, GdkEventConfigure *event, gpoint { g_debug("GisOpenGL: on_configure"); + /* wait for "realize" */ + if (!gdk_gl_context_get_current()) + return FALSE; + double width = GTK_WIDGET(opengl)->allocation.width; double height = GTK_WIDGET(opengl)->allocation.height;