From: Timm Bäder Date: Fri, 3 Nov 2017 09:44:16 +0000 (+0100) Subject: glarea: Use content size of the widget X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~23^2~915 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4f4ac29cd2c850c7331c71827ed3b346ceafa543;p=gtk4.git glarea: Use content size of the widget For buffer sizes, etc. We only draw in the content area after all. --- diff --git a/gtk/gtkglarea.c b/gtk/gtkglarea.c index 5cbbe5e564..27157a0acc 100644 --- a/gtk/gtkglarea.c +++ b/gtk/gtkglarea.c @@ -433,8 +433,8 @@ gtk_gl_area_allocate_buffers (GtkGLArea *area) return; scale = gtk_widget_get_scale_factor (widget); - width = gtk_widget_get_allocated_width (widget) * scale; - height = gtk_widget_get_allocated_height (widget) * scale; + width = gtk_widget_get_width (widget) * scale; + height = gtk_widget_get_height (widget) * scale; if (priv->texture) { @@ -632,8 +632,8 @@ gtk_gl_area_draw (GtkWidget *widget, { gtk_gl_area_draw_error_screen (area, cr, - gtk_widget_get_allocated_width (widget), - gtk_widget_get_allocated_height (widget)); + gtk_widget_get_width (widget), + gtk_widget_get_height (widget)); return FALSE; } @@ -650,8 +650,8 @@ gtk_gl_area_draw (GtkWidget *widget, glDisable (GL_DEPTH_TEST); scale = gtk_widget_get_scale_factor (widget); - w = gtk_widget_get_allocated_width (widget) * scale; - h = gtk_widget_get_allocated_height (widget) * scale; + w = gtk_widget_get_width (widget) * scale; + h = gtk_widget_get_height (widget) * scale; status = glCheckFramebufferStatusEXT (GL_FRAMEBUFFER_EXT); if (status == GL_FRAMEBUFFER_COMPLETE_EXT)