GNOME Bugzilla – Bug 701751
GtkProgressBar causes warnings
Last modified: 2013-11-10 04:53:26 UTC
Created attachment 246169 [details] [review] A patch that fixes the problem When doing updates, gtk_progress_bar_real_update can calculate compute a negative value for activity_pos: if (pbar->activity_dir == 0) { pbar->activity_pos += pbar->activity_step; if (pbar->activity_pos + size >= widget->allocation.width - widget->style->xthickness) { pbar->activity_pos = widget->allocation.width - widget->style->xthickness - size; pbar->activity_dir = 1; } } If the allocation width is smaller than (xthickness + size), pbar->activity_pos will be set to a negative value and this will cause the drawing code to emit a warning about coordinates being out of bounds (in this case x will be negative). The fix is to make activity_pos always positive, like the attached patch does.