mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
GTK1 runtime fix: widen extent of ignore_sbar.
ignore_sbar is a flag that we set while manually changing the scrollbar settings, so that when those half-finished changes trigger GTK event callbacks, we know to ignore them, and wait until we've finished setting everything up before actually updating the window. But somehow I had managed to leave the functions that actually _have the effect_ (at least in GTK1) outside the pair of statements that set and unset the ignore flag. The effect was that compiling pterm for GTK1, starting it up, and issuing a command like 'ls -l' that scrolls off the bottom of the window would lead to the _top_ half of the ls output being visible, and the scrollbar at the top of the scrollback rather than the bottom.
This commit is contained in:
parent
9909077be1
commit
c74d1e3c6a
@ -2884,13 +2884,13 @@ void set_sbar(void *frontend, int total, int start, int page)
|
||||
struct gui_data *inst = (struct gui_data *)frontend;
|
||||
if (!conf_get_int(inst->conf, CONF_scrollbar))
|
||||
return;
|
||||
inst->ignore_sbar = TRUE;
|
||||
gtk_adjustment_set_lower(inst->sbar_adjust, 0);
|
||||
gtk_adjustment_set_upper(inst->sbar_adjust, total);
|
||||
gtk_adjustment_set_value(inst->sbar_adjust, start);
|
||||
gtk_adjustment_set_page_size(inst->sbar_adjust, page);
|
||||
gtk_adjustment_set_step_increment(inst->sbar_adjust, 1);
|
||||
gtk_adjustment_set_page_increment(inst->sbar_adjust, page/2);
|
||||
inst->ignore_sbar = TRUE;
|
||||
#if !GTK_CHECK_VERSION(3,18,0)
|
||||
gtk_adjustment_changed(inst->sbar_adjust);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user