summaryrefslogtreecommitdiff
path: root/desktop/scrollbar.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-09-19 12:33:34 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2014-09-19 12:33:34 +0100
commit5b96a84ef7ccc4ed426b2b130328437089bb6af0 (patch)
tree56c9df2bda9e8c81975fdee614aec55554b7cb4d /desktop/scrollbar.c
parent6a74106d36059d27ad7150e0ad2c56d0ead80990 (diff)
downloadnetsurf-5b96a84ef7ccc4ed426b2b130328437089bb6af0.tar.gz
netsurf-5b96a84ef7ccc4ed426b2b130328437089bb6af0.tar.bz2
Setting extents can move scroll pos, so send message.
Diffstat (limited to 'desktop/scrollbar.c')
-rw-r--r--desktop/scrollbar.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/desktop/scrollbar.c b/desktop/scrollbar.c
index 3d21aae02..948009fb5 100644
--- a/desktop/scrollbar.c
+++ b/desktop/scrollbar.c
@@ -510,8 +510,9 @@ int scrollbar_get_offset(struct scrollbar *s)
void scrollbar_set_extents(struct scrollbar *s, int length,
int visible_size, int full_size)
{
- int well_length;
int cur_excess = s->full_size - s->visible_size;
+ int well_length;
+ struct scrollbar_msg_data msg;
if (length != -1)
s->length = length;
@@ -539,6 +540,11 @@ void scrollbar_set_extents(struct scrollbar *s, int length,
s->bar_len = (well_length * s->visible_size) / s->full_size;
s->bar_pos = (well_length * s->offset) / s->full_size;
}
+
+ msg.scrollbar = s;
+ msg.msg = SCROLLBAR_MSG_MOVED;
+ msg.scroll_offset = s->offset;
+ s->client_callback(s->client_data, &msg);
}