[gtk+/wip/gdk-gl: 16/31] glarea: Unconditionally call gdk_gl_context_update()
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/gdk-gl: 16/31] glarea: Unconditionally call gdk_gl_context_update()
- Date: Thu, 14 Aug 2014 11:13:40 +0000 (UTC)
commit 54edcca4d5bf9f739b54bcc0ed403cfd010d00c9
Author: Emmanuele Bassi <ebassi gnome org>
Date: Tue Aug 12 11:54:08 2014 +0100
glarea: Unconditionally call gdk_gl_context_update()
There's no need to check for different sizes.
gtk/gtkglarea.c | 9 +--------
1 files changed, 1 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkglarea.c b/gtk/gtkglarea.c
index d020d28..a2800bf 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]