summaryrefslogtreecommitdiffstats
path: root/src/group.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-12-14 05:29:47 +0000
committerDavid Robillard <d@drobilla.net>2011-12-14 05:29:47 +0000
commit3680d163650c1d79869952520aba2eae281da95e (patch)
treebd372ecf5b1c954e6bffd6c9415c641983d106e2 /src/group.c
parenta70ec768ee9a3a5783f2c07feb77e67ced78a802 (diff)
downloadganv-3680d163650c1d79869952520aba2eae281da95e.tar.gz
ganv-3680d163650c1d79869952520aba2eae281da95e.tar.bz2
ganv-3680d163650c1d79869952520aba2eae281da95e.zip
Draw directly to window cairo context instead of gdk pixmap.
git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@3875 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/group.c')
-rw-r--r--src/group.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/group.c b/src/group.c
index 0e38396..160c755 100644
--- a/src/group.c
+++ b/src/group.c
@@ -205,6 +205,11 @@ ganv_group_draw(GanvItem* item, cairo_t* cr,
group = GANV_GROUP(item);
+ // Draw background
+ cairo_set_source_rgba(cr, 0, 0, 0, 1.0);
+ cairo_rectangle(cr, x, y, width, height);
+ cairo_fill(cr);
+
for (list = group->item_list; list; list = list->next) {
child = list->data;
@@ -283,7 +288,12 @@ ganv_group_point(GanvItem* item, double x, double y, int cx, int cy,
}
}
- return best;
+ if (*actual_item) {
+ return best;
+ } else {
+ *actual_item = item;
+ return 0.0;
+ }
}
static void