[gtk+] widget: queue a redraw only if resize highlighting is enabled
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] widget: queue a redraw only if resize highlighting is enabled
- Date: Wed, 30 Mar 2016 19:45:32 +0000 (UTC)
commit 71a5f07620449be45067084b78183bb5661d5eb1
Author: Benjamin Otte <otte redhat com>
Date: Wed Mar 30 21:41:08 2016 +0200
widget: queue a redraw only if resize highlighting is enabled
e8aa9b0440e03e7002323922f862342db51c5f32 introduced a new debug mode
that highlights resizes. Unfortunately it has the side effect of
always queueing redraws even when the debug mode is not enabled.
Make the redraw conditional.
gtk/gtkwidget.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index b7346e1..95b8e24 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -5959,8 +5959,11 @@ gtk_widget_size_allocate_with_baseline (GtkWidget *widget,
gtk_widget_push_verify_invariants (widget);
#ifdef G_ENABLE_DEBUG
- priv->highlight_resize = TRUE;
- gtk_widget_queue_draw (widget);
+ if (GTK_DEBUG_CHECK (RESIZE))
+ {
+ priv->highlight_resize = TRUE;
+ gtk_widget_queue_draw (widget);
+ }
if (gtk_widget_get_resize_needed (widget))
{
@@ -7005,8 +7008,7 @@ gtk_widget_draw_internal (GtkWidget *widget,
cairo_restore (cr);
}
}
- if (GTK_DISPLAY_DEBUG_CHECK (gtk_widget_get_display (widget), RESIZE) &&
- widget->priv->highlight_resize)
+ if (widget->priv->highlight_resize)
{
GtkAllocation alloc;
gtk_widget_get_allocation (widget, &alloc);
@@ -7018,7 +7020,6 @@ gtk_widget_draw_internal (GtkWidget *widget,
gtk_widget_queue_draw (widget);
widget->priv->highlight_resize = FALSE;
-
}
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]