[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/macterm.c,v [EMACS_22_BASE]
From: |
YAMAMOTO Mitsuharu |
Subject: |
[Emacs-diffs] Changes to emacs/src/macterm.c,v [EMACS_22_BASE] |
Date: |
Mon, 21 Jan 2008 09:59:26 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Branch: EMACS_22_BASE
Changes by: YAMAMOTO Mitsuharu <mituharu> 08/01/21 09:59:26
Index: macterm.c
===================================================================
RCS file: /sources/emacs/emacs/src/macterm.c,v
retrieving revision 1.214.2.12
retrieving revision 1.214.2.13
diff -u -b -r1.214.2.12 -r1.214.2.13
--- macterm.c 8 Jan 2008 04:29:56 -0000 1.214.2.12
+++ macterm.c 21 Jan 2008 09:59:25 -0000 1.214.2.13
@@ -4998,6 +4998,7 @@
XSETINT (bar->start, 0);
XSETINT (bar->end, 0);
bar->dragging = Qnil;
+ bar->redraw_needed_p = Qnil;
#ifdef USE_TOOLKIT_SCROLL_BARS
bar->track_top = Qnil;
bar->track_height = Qnil;
@@ -5193,10 +5194,20 @@
BLOCK_INPUT;
/* If already correctly positioned, do nothing. */
- if (!(XINT (bar->left) == sb_left
+ if (XINT (bar->left) == sb_left
&& XINT (bar->top) == top
&& XINT (bar->width) == sb_width
- && XINT (bar->height) == height))
+ && XINT (bar->height) == height)
+ {
+ if (!NILP (bar->redraw_needed_p))
+ {
+#if USE_CG_DRAWING
+ mac_prepare_for_quickdraw (f);
+#endif
+ Draw1Control (SCROLL_BAR_CONTROL_HANDLE (bar));
+ }
+ }
+ else
{
/* Since toolkit scroll bars are smaller than the space reserved
for them on the frame, we have to clear "under" them. */
@@ -5229,6 +5240,8 @@
UNBLOCK_INPUT;
}
+ bar->redraw_needed_p = Qnil;
+
#ifdef USE_TOOLKIT_SCROLL_BARS
if (NILP (bar->track_top))
{
@@ -5581,8 +5594,15 @@
x_scroll_bar_clear (f)
FRAME_PTR f;
{
- XTcondemn_scroll_bars (f);
- XTjudge_scroll_bars (f);
+ Lisp_Object bar;
+
+ /* We can have scroll bars even if this is 0,
+ if we just turned off scroll bar mode.
+ But in that case we should not clear them. */
+ if (FRAME_HAS_VERTICAL_SCROLL_BARS (f))
+ for (bar = FRAME_SCROLL_BARS (f); VECTORP (bar);
+ bar = XSCROLL_BAR (bar)->next)
+ XSCROLL_BAR (bar)->redraw_needed_p = Qt;
}