[gtk+/wip/baedert/drawing: 174/396] gizmo: Chain up in snapshot if no snapshot func given



commit 48a9c48dafa64c72a1009d08a6f376d49141590d
Author: Timm Bäder <mail baedert org>
Date:   Thu May 11 21:49:37 2017 +0200

    gizmo: Chain up in snapshot if no snapshot func given
    
    I.e. when gizmo users just want to draw child widgets anyway and don't
    do any custom drawing, they can simply pass NULL.

 gtk/gtkgizmo.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkgizmo.c b/gtk/gtkgizmo.c
index 5c065e5..38cd3d5 100644
--- a/gtk/gtkgizmo.c
+++ b/gtk/gtkgizmo.c
@@ -46,6 +46,8 @@ gtk_gizmo_snapshot (GtkWidget   *widget,
 
   if (self->snapshot_func)
     self->snapshot_func (self, snapshot);
+  else
+    GTK_WIDGET_CLASS (gtk_gizmo_parent_class)->snapshot (widget, snapshot);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]