aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu2006-02-23 10:43:32 +0000
committerYAMAMOTO Mitsuharu2006-02-23 10:43:32 +0000
commit5b574e69573e5026e25bc383acbb97d59d07ce35 (patch)
tree9a15a3de4a3eaa7e8b494dc11dc8220e28750cf0
parent92fb55166261b75d61de24742b70e73f627e45d6 (diff)
downloademacs-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.
-rw-r--r--src/ChangeLog3
-rw-r--r--src/macterm.c22
2 files changed, 16 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ea7a5e7d70b..fe8b13409ef 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -7,6 +7,9 @@
7 * dispnew.c (update_text_area): Avoid needless redraw of rightmost 7 * dispnew.c (update_text_area): Avoid needless redraw of rightmost
8 glyph whose face is extended to the text area end. 8 glyph whose face is extended to the text area end.
9 9
10 * macterm.c (x_set_toolkit_scroll_bar_thumb): Don't set control
11 values if control is not visible or values are not changed.
12
102006-02-22 Stefan Monnier <monnier@iro.umontreal.ca> 132006-02-22 Stefan Monnier <monnier@iro.umontreal.ca>
11 14
12 * window.c (Fwindow_list): Check `window' before doing XWINDOW. 15 * window.c (Fwindow_list): Check `window' before doing XWINDOW.
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}