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



commit a4343d7b0e4d495215c0b840fcb872c98e9023fb
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]