diff options
| author | Joakim Verona | 2013-01-14 00:04:04 +0100 |
|---|---|---|
| committer | Joakim Verona | 2013-01-14 00:04:04 +0100 |
| commit | 132fdce3d2530db5a6edeaf4242257ff01ea4760 (patch) | |
| tree | 75638977b562d18c4cb2b20fab58262bbbe4c2be /src/xterm.c | |
| parent | ec43cd5d7289dd1a994dc3517fccce1611966f89 (diff) | |
| parent | b35b088608a02d43b39bbfd3240547d3d9de7366 (diff) | |
| download | emacs-132fdce3d2530db5a6edeaf4242257ff01ea4760.tar.gz emacs-132fdce3d2530db5a6edeaf4242257ff01ea4760.zip | |
auto upstream
Diffstat (limited to 'src/xterm.c')
| -rw-r--r-- | src/xterm.c | 43 |
1 files changed, 28 insertions, 15 deletions
diff --git a/src/xterm.c b/src/xterm.c index e24fbd19f2b..212530e5acf 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -4811,21 +4811,24 @@ x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int positio | |||
| 4811 | 4811 | ||
| 4812 | #ifdef USE_MOTIF | 4812 | #ifdef USE_MOTIF |
| 4813 | 4813 | ||
| 4814 | /* We use an estimate of 30 chars per line rather than the real | 4814 | if (scroll_bar_adjust_thumb_portion_p) |
| 4815 | `portion' value. This has the disadvantage that the thumb size | 4815 | { |
| 4816 | is not very representative, but it makes our life a lot easier. | 4816 | /* We use an estimate of 30 chars per line rather than the real |
| 4817 | Otherwise, we have to constantly adjust the thumb size, which | 4817 | `portion' value. This has the disadvantage that the thumb size |
| 4818 | we can't always do quickly enough: while dragging, the size of | 4818 | is not very representative, but it makes our life a lot easier. |
| 4819 | the thumb might prevent the user from dragging the thumb all the | 4819 | Otherwise, we have to constantly adjust the thumb size, which |
| 4820 | way to the end. but Motif and some versions of Xaw3d don't allow | 4820 | we can't always do quickly enough: while dragging, the size of |
| 4821 | updating the thumb size while dragging. Also, even if we can update | 4821 | the thumb might prevent the user from dragging the thumb all the |
| 4822 | its size, the update will often happen too late. | 4822 | way to the end. but Motif and some versions of Xaw3d don't allow |
| 4823 | If you don't believe it, check out revision 1.650 of xterm.c to see | 4823 | updating the thumb size while dragging. Also, even if we can update |
| 4824 | what hoops we were going through and the still poor behavior we got. */ | 4824 | its size, the update will often happen too late. |
| 4825 | portion = WINDOW_TOTAL_LINES (XWINDOW (bar->window)) * 30; | 4825 | If you don't believe it, check out revision 1.650 of xterm.c to see |
| 4826 | /* When the thumb is at the bottom, position == whole. | 4826 | what hoops we were going through and the still poor behavior we got. */ |
| 4827 | So we need to increase `whole' to make space for the thumb. */ | 4827 | portion = WINDOW_TOTAL_LINES (XWINDOW (bar->window)) * 30; |
| 4828 | whole += portion; | 4828 | /* When the thumb is at the bottom, position == whole. |
| 4829 | So we need to increase `whole' to make space for the thumb. */ | ||
| 4830 | whole += portion; | ||
| 4831 | } | ||
| 4829 | 4832 | ||
| 4830 | if (whole <= 0) | 4833 | if (whole <= 0) |
| 4831 | top = 0, shown = 1; | 4834 | top = 0, shown = 1; |
| @@ -10802,6 +10805,16 @@ With MS Windows or Nextstep, the value is t. */); | |||
| 10802 | Vx_toolkit_scroll_bars = Qnil; | 10805 | Vx_toolkit_scroll_bars = Qnil; |
| 10803 | #endif | 10806 | #endif |
| 10804 | 10807 | ||
| 10808 | DEFVAR_BOOL ("scroll-bar-adjust-thumb-portion", | ||
| 10809 | scroll_bar_adjust_thumb_portion_p, | ||
| 10810 | doc: /* Adjust thumb for overscrolling for Gtk+ and MOTIF. | ||
| 10811 | Non-nil means adjust the thumb in the scroll bar so it can be dragged downwards | ||
| 10812 | even if the end of the buffer is shown (i.e. overscrolling). | ||
| 10813 | Set to nil if you want the thumb to be at the bottom when the end of the buffer | ||
| 10814 | is shown. Also, the thumb fills the whole scroll bar when the entire buffer | ||
| 10815 | is visible. In this case you can not overscroll. */); | ||
| 10816 | scroll_bar_adjust_thumb_portion_p = 1; | ||
| 10817 | |||
| 10805 | staticpro (&last_mouse_motion_frame); | 10818 | staticpro (&last_mouse_motion_frame); |
| 10806 | last_mouse_motion_frame = Qnil; | 10819 | last_mouse_motion_frame = Qnil; |
| 10807 | 10820 | ||