diff options
| author | YAMAMOTO Mitsuharu | 2006-02-23 10:43:32 +0000 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2006-02-23 10:43:32 +0000 |
| commit | 5b574e69573e5026e25bc383acbb97d59d07ce35 (patch) | |
| tree | 9a15a3de4a3eaa7e8b494dc11dc8220e28750cf0 /src/macterm.c | |
| parent | 92fb55166261b75d61de24742b70e73f627e45d6 (diff) | |
| download | emacs-5b574e69573e5026e25bc383acbb97d59d07ce35.tar.gz emacs-5b574e69573e5026e25bc383acbb97d59d07ce35.zip | |
(x_set_toolkit_scroll_bar_thumb): Don't set control
values if control is not visible or values are not changed.
Diffstat (limited to 'src/macterm.c')
| -rw-r--r-- | src/macterm.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/macterm.c b/src/macterm.c index 5fd416be6b8..3bd7d3b2e24 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -4529,7 +4529,7 @@ x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole) | |||
| 4529 | int portion, position, whole; | 4529 | int portion, position, whole; |
| 4530 | { | 4530 | { |
| 4531 | ControlHandle ch = SCROLL_BAR_CONTROL_HANDLE (bar); | 4531 | ControlHandle ch = SCROLL_BAR_CONTROL_HANDLE (bar); |
| 4532 | int value, viewsize, maximum, visible_p; | 4532 | int value, viewsize, maximum; |
| 4533 | 4533 | ||
| 4534 | if (whole == 0 || XINT (bar->track_height) == 0) | 4534 | if (whole == 0 || XINT (bar->track_height) == 0) |
| 4535 | value = 0, viewsize = 1, maximum = 0; | 4535 | value = 0, viewsize = 1, maximum = 0; |
| @@ -4542,16 +4542,20 @@ x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole) | |||
| 4542 | 4542 | ||
| 4543 | BLOCK_INPUT; | 4543 | BLOCK_INPUT; |
| 4544 | 4544 | ||
| 4545 | /* Temporarily hide the scroll bar to avoid multiple redraws. */ | 4545 | if (IsControlVisible (ch) |
| 4546 | visible_p = IsControlVisible (ch); | 4546 | && (GetControlViewSize (ch) != viewsize |
| 4547 | SetControlVisibility (ch, false, false); | 4547 | || GetControl32BitValue (ch) != value |
| 4548 | || GetControl32BitMaximum (ch) != maximum)) | ||
| 4549 | { | ||
| 4550 | /* Temporarily hide the scroll bar to avoid multiple redraws. */ | ||
| 4551 | SetControlVisibility (ch, false, false); | ||
| 4548 | 4552 | ||
| 4549 | SetControl32BitMinimum (ch, 0); | 4553 | SetControl32BitMaximum (ch, maximum); |
| 4550 | SetControl32BitMaximum (ch, maximum); | 4554 | SetControl32BitValue (ch, value); |
| 4551 | SetControl32BitValue (ch, value); | 4555 | SetControlViewSize (ch, viewsize); |
| 4552 | SetControlViewSize (ch, viewsize); | ||
| 4553 | 4556 | ||
| 4554 | SetControlVisibility (ch, visible_p, true); | 4557 | SetControlVisibility (ch, true, true); |
| 4558 | } | ||
| 4555 | 4559 | ||
| 4556 | UNBLOCK_INPUT; | 4560 | UNBLOCK_INPUT; |
| 4557 | } | 4561 | } |