Only handle exposes on native window, propagate to children via draw()
We now consider non-native windows non-opaque, which means any invalid area in a subwindow will also be invalid all the way up to the nearest native windows. We take advantage of this by ignoring all expose events on non-native windows (which typically means just the toplevel) and instead propagating down the draw() calls to children directly via gtk_container_propagate_draw. This is nice as it means we always draw widgets the same way, and it will let us do some interesting ways in the future. We also clean up the GtkWidget opacity handling as we can now always rely on the draing happening via cairo. We can't really just draw by walking down the widget hierarchy, as this doesn't get the clipping right (so e.g. widgets doing cairo_paint may draw outside the expected gdkwindow subarea) nor does it let us paint window backgrounds. So, we now do multiple draws for each widget, once for each GdkWindow, although we still do it on the same base cairo_t that we get for the toplevel native window. The difference is only the clipping, the rendering order, and which other widgets we propagate into. We also collect all the windows of a widget so we can expose them inside the same opacity group if needed. NOTE: This change neuters gtk_widget_set_double_buffered for widgets without native windows. Its impossible to disable the double buffering in this model.
Showing with 251 additions and 202 deletions