glarea: Ensure that the viewport is correctly set

Call gdk_gl_context_update() once we create the GdkWindow inside the
::realize implementation of GtkGLArea, to ensure that the GL viewport is
updated with the size of the GDK window.
This commit is contained in:
Emmanuele Bassi
2014-08-18 18:07:45 +01:00
parent 4d07a9ad3a
commit 6d22f2a46a

View File

@@ -296,7 +296,10 @@ gtk_gl_area_realize (GtkWidget *widget)
gtk_widget_set_window (widget, window);
if (context != NULL)
gdk_gl_context_set_window (context, gtk_widget_get_window (widget));
{
gdk_gl_context_set_window (context, window);
gdk_gl_context_update (context);
}
}
static void