summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2014-08-18 18:07:45 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2014-08-18 18:07:45 +0100
commit6d22f2a46a20623d51b6713dcc452d526d27360e (patch)
treefe2895d01819c64b4aec985668086b6fe50e887f
parent4d07a9ad3a3954a87db590d2a59b7d156d02d1cf (diff)
downloadgtk+-wip/gdk-gl.tar.gz
glarea: Ensure that the viewport is correctly setwip/gdk-gl
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.
-rw-r--r--gtk/gtkglarea.c5
1 files changed, 4 insertions, 1 deletions
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