[gimp/gimp-2-10] app: in gimp_widget_blink_cancel(), avoid redrawing non-blinking widget
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] app: in gimp_widget_blink_cancel(), avoid redrawing non-blinking widget
- Date: Mon, 10 Dec 2018 19:20:45 +0000 (UTC)
commit df475195d441512431d479de8b3256a02c3192c9
Author: Ell <ell_se yahoo com>
Date: Mon Dec 10 14:14:34 2018 -0500
app: in gimp_widget_blink_cancel(), avoid redrawing non-blinking widget
Since commit fe139e566293337fa8e7a4ae64e2e00dc6fe3eaa, when
blinking a widget, we cancel blinking for all its ancestors. Avoid
redrawing all the ancestors as a result, unless they're actually
blinking. This prevents some noticeable lag when blinking a
widget.
(cherry picked from commit 5a2dee29d76b3d65d41804875581dee30500f270)
app/widgets/gimpwidgets-utils.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/app/widgets/gimpwidgets-utils.c b/app/widgets/gimpwidgets-utils.c
index f14f6b1cf5..a460fa938d 100644
--- a/app/widgets/gimpwidgets-utils.c
+++ b/app/widgets/gimpwidgets-utils.c
@@ -1505,9 +1505,12 @@ void gimp_widget_blink_cancel (GtkWidget *widget)
{
g_return_if_fail (GTK_IS_WIDGET (widget));
- gimp_highlight_widget (widget, FALSE);
+ if (g_object_get_data (G_OBJECT (widget), "gimp-widget-blink"))
+ {
+ gimp_highlight_widget (widget, FALSE);
- g_object_set_data (G_OBJECT (widget), "gimp-widget-blink", NULL);
+ g_object_set_data (G_OBJECT (widget), "gimp-widget-blink", NULL);
+ }
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]