Optimise case where scrollbar_set_extents call changes nothing.
This commit is contained in:
parent
5b96a84ef7
commit
2551885fd6
|
@ -514,6 +514,12 @@ void scrollbar_set_extents(struct scrollbar *s, int length,
|
|||
int well_length;
|
||||
struct scrollbar_msg_data msg;
|
||||
|
||||
if (length == s->length && visible_size == s->visible_size &&
|
||||
full_size == s->full_size) {
|
||||
/* Nothing's changed. */
|
||||
return;
|
||||
}
|
||||
|
||||
if (length != -1)
|
||||
s->length = length;
|
||||
if (visible_size != -1)
|
||||
|
|
Loading…
Reference in New Issue