From 8fda149baeaad32fa646522c3562ad806bdaf6a1 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 3 Jun 2013 19:49:36 +0100 Subject: Make heights signed, to simplify comparison with struct rect values, which are signed. --- desktop/tree.c | 3 ++- desktop/treeview.c | 8 +++----- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'desktop') diff --git a/desktop/tree.c b/desktop/tree.c index 92a25109c..07a69f39e 100644 --- a/desktop/tree.c +++ b/desktop/tree.c @@ -244,7 +244,8 @@ static void treeview_test_redraw(struct tree *tree, int x, int y, clip.y0 = clip_y; clip.x1 = clip_x + clip_width; clip.y1 = clip_y + clip_height; - +LOG(("x:%i, y:%i, clip x0:%i, clip y0:%i, clip x1:%i, clip y1:%i\n", + x, y, clip.x0, clip.y0, clip.x1, clip.y1)); global_history_redraw(x, y, &clip, ctx); } diff --git a/desktop/treeview.c b/desktop/treeview.c index 812b3b330..48f66555a 100644 --- a/desktop/treeview.c +++ b/desktop/treeview.c @@ -31,7 +31,7 @@ #define FIELD_FIRST_ENTRY 1 struct treeview_globals { - uint32_t line_height; + int line_height; int furniture_width; int step_width; int window_padding; @@ -68,7 +68,7 @@ struct treeview_node { enum treeview_node_flags flags; enum treeview_node_type type; - uint32_t height; + int height; struct treeview_node *parent; struct treeview_node *sibling_prev; @@ -821,9 +821,7 @@ void treeview_redraw(struct treeview *tree, int x, int y, struct rect *clip, height = (node->type == TREE_NODE_ENTRY) ? node->height : tree_g.line_height; - if (clip->y0 >= 0 && - render_y + tree_g.line_height < - (unsigned)clip->y0) { + if ((render_y + tree_g.line_height) < clip->y0) { /* This node's line is above clip region */ render_y += height; continue; -- cgit v1.2.3