From 6d22f2a46a20623d51b6713dcc452d526d27360e Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 18 Aug 2014 18:07:45 +0100 Subject: [PATCH] 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. --- gtk/gtkglarea.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gtk/gtkglarea.c b/gtk/gtkglarea.c index 00f0cf5449..eba440a1af 100644 --- a/gtk/gtkglarea.c +++ b/gtk/gtkglarea.c @@ -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