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



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