[gtk+/wip/gdk-gl: 31/31] glarea: Set app-paintable



commit a98d8fd8df13cbd9948b2ce9c1e1bb0be90907cb
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Thu Aug 14 12:10:47 2014 +0100

    glarea: Set app-paintable
    
    The GL viewport is responsible for painting everything, including the
    backgound.

 gtk/gtkglarea.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkglarea.c b/gtk/gtkglarea.c
index c2f9b58..969d114 100644
--- a/gtk/gtkglarea.c
+++ b/gtk/gtkglarea.c
@@ -271,11 +271,11 @@ gtk_gl_area_realize (GtkWidget *widget)
   GdkWindowAttr attributes;
   gint attributes_mask;
 
+  context = gtk_gl_area_create_context (GTK_GL_AREA (widget));
+
   gtk_widget_set_realized (widget, TRUE);
   gtk_widget_get_allocation (widget, &allocation);
 
-  context = gtk_gl_area_create_context (GTK_GL_AREA (widget));
-
   attributes.window_type = GDK_WINDOW_CHILD;
   attributes.x = allocation.x;
   attributes.y = allocation.y;
@@ -524,6 +524,7 @@ static void
 gtk_gl_area_init (GtkGLArea *self)
 {
   gtk_widget_set_has_window (GTK_WIDGET (self), TRUE);
+  gtk_widget_set_app_paintable (GTK_WIDGET (self), TRUE);
 }
 
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]