[gimp] 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] app: in gimp_widget_blink_cancel(), avoid redrawing non-blinking widget
- Date: Mon, 10 Dec 2018 19:20:50 +0000 (UTC)
commit 5a2dee29d76b3d65d41804875581dee30500f270
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.
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 9e6edaecad..c40e866681 100644
--- a/app/widgets/gimpwidgets-utils.c
+++ b/app/widgets/gimpwidgets-utils.c
@@ -1367,9 +1367,12 @@ 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]