diff --git a/demos/widget-factory/widget-factory.c b/demos/widget-factory/widget-factory.c index 52c9988b66..9b7cde1946 100644 --- a/demos/widget-factory/widget-factory.c +++ b/demos/widget-factory/widget-factory.c @@ -1877,7 +1877,7 @@ activate (GApplication *app) window); controller = gtk_shortcut_controller_new (); - gtk_event_controller_set_propagation_phase (controller, GTK_PHASE_CAPTURE); + gtk_event_controller_set_propagation_phase (controller, GTK_PHASE_BUBBLE); for (i = 0; i < G_N_ELEMENTS (late_accels); i++) { diff --git a/docs/reference/gtk/drawing-model.xml b/docs/reference/gtk/drawing-model.xml index 27cf247aef..88b10df78a 100644 --- a/docs/reference/gtk/drawing-model.xml +++ b/docs/reference/gtk/drawing-model.xml @@ -206,11 +206,17 @@ During the Paint phase GTK receives a single #GdkSurface::render signal on the toplevel surface. The signal handler will create a snapshot object (which is a helper for creating a scene graph) and call the - #GtkWidget::snapshot() vfunc, which will propagate down the widget hierarchy. + #GtkWidget::snapshot() vfunc, which will propagate down the widget hierarchy. This lets each widget snapshot its content at the right place and time, correctly handling things like partial transparencies and overlapping widgets. + + During the snapshotting of each widget, GTK automatically handles the CSS + rendering according to the CSS box model. It snapshots first the background, + then the border, then the widget content itself, and finally the outline. + + To avoid excessive work when generating scene graphs, GTK caches render nodes. Each widget keeps a reference to its render node (which in turn, will refer to diff --git a/gtk/gtkdragicon.c b/gtk/gtkdragicon.c index a431716e5b..570c1f5f04 100644 --- a/gtk/gtkdragicon.c +++ b/gtk/gtkdragicon.c @@ -78,7 +78,7 @@ static GParamSpec *properties[LAST_ARG] = { NULL, }; static void gtk_drag_icon_root_init (GtkRootInterface *iface); static void gtk_drag_icon_native_init (GtkNativeInterface *iface); -G_DEFINE_TYPE_WITH_CODE (GtkDragIcon, gtk_drag_icon, GTK_TYPE_CONTAINER, +G_DEFINE_TYPE_WITH_CODE (GtkDragIcon, gtk_drag_icon, GTK_TYPE_WIDGET, G_IMPLEMENT_INTERFACE (GTK_TYPE_NATIVE, gtk_drag_icon_native_init) G_IMPLEMENT_INTERFACE (GTK_TYPE_ROOT, diff --git a/gtk/gtkdragicon.h b/gtk/gtkdragicon.h index 9bea90b880..8f02287646 100644 --- a/gtk/gtkdragicon.h +++ b/gtk/gtkdragicon.h @@ -35,7 +35,7 @@ G_BEGIN_DECLS #define GTK_TYPE_DRAG_ICON (gtk_drag_icon_get_type ()) GDK_AVAILABLE_IN_ALL -G_DECLARE_FINAL_TYPE (GtkDragIcon, gtk_drag_icon, GTK, DRAG_ICON, GtkContainer) +G_DECLARE_FINAL_TYPE (GtkDragIcon, gtk_drag_icon, GTK, DRAG_ICON, GtkWidget) GDK_AVAILABLE_IN_ALL GtkWidget * gtk_drag_icon_get_for_drag (GdkDrag *drag);