summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-06-03 19:49:36 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2013-06-03 19:49:36 +0100
commit8fda149baeaad32fa646522c3562ad806bdaf6a1 (patch)
treea2f86213ff32512b125400fd5a3fa3d49b25a430
parent088d60ec9662d2ecc34410fbaf6a7ff05c9e5558 (diff)
downloadnetsurf-8fda149baeaad32fa646522c3562ad806bdaf6a1.tar.gz
netsurf-8fda149baeaad32fa646522c3562ad806bdaf6a1.tar.bz2
Make heights signed, to simplify comparison with struct rect values, which are signed.
-rw-r--r--desktop/tree.c3
-rw-r--r--desktop/treeview.c8
2 files changed, 5 insertions, 6 deletions
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;