summaryrefslogtreecommitdiff
path: root/gtk/gtkwidgetpaintableprivate.h
Commit message (Collapse)AuthorAgeFilesLines
* widgetpaintable: Protect against too many signalsBenjamin Otte2018-04-051-0/+30
This is actually not just a mechnaism to protect against too many signals, but it's also a method to getting those signals at the wrong time. For every size/content change, a widget needs to invalidate twice: Once when it queues a resize/redraw (going valid => invalid) and once when the new size/content is actually assigned (going invalid => valid). However, one of those invalidations might be inconvenient for the listener. GtkImage for example does not like receiving invalidate-contents signals when new contents are assigned, but is fine with them when the old ones go invalid. And it will not try to draw the paintable in between anyway. So by bypassing the 2nd emission if nothing was changed, we can make GtkImage happy.