X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=src%2Fgis-opengl.c;fp=src%2Fgis-opengl.c;h=9deb0064db89ea9caf7a2ef988f078e9c5c22c37;hb=dd793d5eb5f129d28a6177e8425f9afcc9a724b6;hp=ecbf47a4c140fa457de449051e88eb39696ceb00;hpb=69d6b0820471501771d0f520e41a5635fcab2e2d;p=grits 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;