diff --git a/src/printing.c b/src/printing.c index 4d64e2e029..b5a25a707e 100644 --- a/src/printing.c +++ b/src/printing.c @@ -292,6 +292,8 @@ static void end_print(GtkPrintOperation *operation, GtkPrintContext *context, gp if (dinfo == NULL) return; + /* see ui_progress_bar_stop() for more details on why this is called */ + gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(main_widgets.progressbar), 0.0); gtk_widget_hide(main_widgets.progressbar); g_object_unref(dinfo->sci); g_object_unref(dinfo->layout); diff --git a/src/ui_utils.c b/src/ui_utils.c index 4d76e08060..f005928844 100644 --- a/src/ui_utils.c +++ b/src/ui_utils.c @@ -2863,6 +2863,10 @@ void ui_progress_bar_stop(void) g_source_remove(progress_bar_timer_id); progress_bar_timer_id = 0; } + + /* hack to remove tick callback which is created for "activity mode" progress + * bars - without this it is called forever and causes elevated CPU usage */ + gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(main_widgets.progressbar), 0.0); }