From 54edcca4d5bf9f739b54bcc0ed403cfd010d00c9 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 12 Aug 2014 11:54:08 +0100 Subject: glarea: Unconditionally call gdk_gl_context_update() There's no need to check for different sizes. --- gtk/gtkglarea.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/gtk/gtkglarea.c b/gtk/gtkglarea.c index d020d28d1d..a2800bfa7e 100644 --- a/gtk/gtkglarea.c +++ b/gtk/gtkglarea.c @@ -189,26 +189,19 @@ gtk_gl_area_size_allocate (GtkWidget *widget, GtkAllocation *allocation) { GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private ((GtkGLArea *) widget); - GtkAllocation old_alloc; - gboolean same_size; - gtk_widget_get_allocation (widget, &old_alloc); gtk_widget_set_allocation (widget, allocation); if (!gtk_widget_get_realized (widget)) return; - same_size = old_alloc.width == allocation->width && - old_alloc.height == allocation->height; - gdk_window_move_resize (gtk_widget_get_window (widget), allocation->x, allocation->y, allocation->width, allocation->height); - /* no need to reset the viewport if the size of the window did not change */ - if (priv->context != NULL && !same_size) + if (priv->context != NULL) gdk_gl_context_update (priv->context); } -- cgit v1.2.1