diff options
author | Adrian Lees <adrian@aemulor.com> | 2006-02-12 21:23:22 +0000 |
---|---|---|
committer | Adrian Lees <adrian@aemulor.com> | 2006-02-12 21:23:22 +0000 |
commit | ba474f1c91417a7aa6e07fbe0977523f94d6d3f6 (patch) | |
tree | 6cd7f36724c44f56b334c62141fda82492aced7c /desktop | |
parent | e4e01d338f6d385e7b9a02b6df6ade5178139ae3 (diff) | |
download | netsurf-ba474f1c91417a7aa6e07fbe0977523f94d6d3f6.tar.gz netsurf-ba474f1c91417a7aa6e07fbe0977523f94d6d3f6.tar.bz2 |
[project @ 2006-02-12 21:23:21 by adrianl]
Show all matches
svn path=/import/netsurf/; revision=2076
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/selection.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/desktop/selection.c b/desktop/selection.c index 2bb8cb4e7..689e2cbd9 100644 --- a/desktop/selection.c +++ b/desktop/selection.c @@ -127,9 +127,11 @@ struct selection *selection_create(struct browser_window *bw) /** - * Destroys a selection object. + * Destroys a selection object, without updating the + * owning window (caller should call selection_clear() + * first if update is desired) * - * \param s selection object + * \param s selection object */ void selection_destroy(struct selection *s) @@ -154,15 +156,22 @@ void selection_reinit(struct selection *s, struct box *root) assert(s); - if (s->root == root) { - /* keep the same number space as before, because we want - to keep the selection too */ - root_idx = (s->max_idx & 0xF0000000U); - } - else { + if (IS_INPUT(root)) { static int next_idx = 0; root_idx = (next_idx++) << 28; } + else + root_idx = 0; + +// if (s->root == root) { +// /* keep the same number space as before, because we want +// to keep the selection too */ +// root_idx = (s->max_idx & 0xF0000000U); +// } +// else { +// static int next_idx = 0; +// root_idx = (next_idx++) << 28; +// } s->root = root; if (root) { @@ -667,8 +676,6 @@ void selection_select_all(struct selection *s) old_start = s->start_idx; old_end = s->end_idx; -LOG(("selection was %d: %u to %u, max %u", was_defined, old_start, old_end, s->max_idx)); - s->defined = true; s->start_idx = 0; s->end_idx = s->max_idx; |