GtkSpinner triggers repainting when not visible
GtkSpinner seems to be triggering repainting when not visible, causing applications to wake up at whatever the frame clock is set to.
Users has reported in Geary Bug 783025 that the poll() system call was constantly returning, at a rate of around 60Hz, waking up the app when otherwise idle. This manifested as a small but persistent CPU overhead (~2-4% on my 6th gen i7). I originally thought it was WebKitGTK+ related since that was responsible for most of the CPU use during these wakeups. However when porting Geary's conversation list from GtkTreeView to use GtkListBox (and hence substantially increasing the number of GTK widgets being used), I noticed that the CPU utilisation when idle had gone up dramatically to ~20-30%.
It turned out that a GtkSpinner that is shown only rarely was never being stopped. After ensuring that the spinner is stopped when not visible, CPU use has dropped back down to 0 when idle.
Of course, "don't keep spinners running when not visible" is good advice for application authors, but it seems like the widget should at least be smart enough to manage this optimisation itself as well.