[eog/bugfix/thumb-view-vis-over-queueing] EogThumbView: Fix visible range callback being called to often
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog/bugfix/thumb-view-vis-over-queueing] EogThumbView: Fix visible range callback being called to often
- Date: Sat, 4 Jul 2020 13:24:08 +0000 (UTC)
commit 69e5b8430b861982131e342acf935cfbc0709e24
Author: Felix Riemann <friemann gnome org>
Date: Sat Jul 4 15:15:50 2020 +0200
EogThumbView: Fix visible range callback being called to often
The callback that handles unloading invisible thumbnails is prepared
to only queue the worker function once as idle source.
However, this protection was not used correctly which could cause the
callback queuing the worker multiple times. This could lead to unnecessary
redraw cycles and flickering as mentioned in !42.
src/eog-thumb-view.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/eog-thumb-view.c b/src/eog-thumb-view.c
index 44b16d12..6493f17e 100644
--- a/src/eog-thumb-view.c
+++ b/src/eog-thumb-view.c
@@ -337,7 +337,9 @@ static void
eog_thumb_view_visible_range_changed (EogThumbView *thumbview)
{
if (thumbview->priv->visible_range_changed_id == 0) {
- g_idle_add ((GSourceFunc)visible_range_changed_cb, thumbview);
+ thumbview->priv->visible_range_changed_id =
+ g_idle_add ((GSourceFunc)visible_range_changed_cb,
+ thumbview);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]