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



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