unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Possible merge conflict in src/macterm.[ch]
@ 2008-01-23  0:05 Miles Bader
  2008-01-27 22:08 ` Andreas Tobler
  0 siblings, 1 reply; 4+ messages in thread
From: Miles Bader @ 2008-01-23  0:05 UTC (permalink / raw)
  To: YAMAMOTO Mitsuharu; +Cc: emacs-devel

Hi,

I merged the appended changes to macterm.[ch] from the Emacs 22 release
branch to the trunk.  As there were merge conflicts, and apparently some
trunk changes touched the same code, it seems likely that either this
change shouldn't have been merged, or that I incorrectly resolved the
conflict.

Please check the state of macterm.[ch] in the trunk and make sure it is
correct.

[The appended ChangeLog entry is the original, but the diff is the
change I applied to the trunk, after I tried to fix the conflicts.]

Thanks,

-Miles


2008-01-21  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>

	* macterm.c (x_scroll_bar_create): Initialize bar->redraw_needed_p.
	(XTset_vertical_scroll_bar): Redraw scroll bar if bar->redraw_needed_p
	is set even without positional changes.
	(x_scroll_bar_clear): Set bar->redraw_needed_p.

	* macterm.h (struct scroll_bar): New member `redraw_needed_p'.

--- orig/src/macterm.h
+++ mod/src/macterm.h
@@ -457,6 +457,9 @@
   Lisp_Object fringe_extended_p;
 #endif
 
+  /* t if redraw needed in the next XTset_vertical_scroll_bar call.  */
+  Lisp_Object redraw_needed_p;
+
 #ifdef USE_TOOLKIT_SCROLL_BARS
   /* The position and size of the scroll bar handle track area in
      pixels, relative to the frame.  */

--- orig/src/macterm.c
+++ mod/src/macterm.c
@@ -5069,6 +5069,7 @@
 #ifdef MAC_OSX
   bar->fringe_extended_p = Qnil;
 #endif
+  bar->redraw_needed_p = Qnil;
 #ifdef USE_TOOLKIT_SCROLL_BARS
   bar->track_top = Qnil;
   bar->track_height = Qnil;
@@ -5285,14 +5286,24 @@
       BLOCK_INPUT;
 
       /* If already correctly positioned, do nothing.  */
-      if (!(XINT (bar->left) == sb_left
-	    && XINT (bar->top) == top
-	    && XINT (bar->width) == sb_width
-	    && XINT (bar->height) == height
+      if (XINT (bar->left) == sb_left
+	  && XINT (bar->top) == top
+	  && XINT (bar->width) == sb_width
+	  && XINT (bar->height) == height
 #ifdef MAC_OSX
-	    && !NILP (bar->fringe_extended_p) == fringe_extended_p
+	  && !NILP (bar->fringe_extended_p) == fringe_extended_p
 #endif
-	    ))
+	  )
+	{
+	  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.  */
@@ -5334,6 +5345,8 @@
   bar->fringe_extended_p = fringe_extended_p ? Qt : Qnil;
 #endif
 
+  bar->redraw_needed_p = Qnil;
+
 #ifdef USE_TOOLKIT_SCROLL_BARS
   if (NILP (bar->track_top))
     {
@@ -5691,8 +5704,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;
 }
 
 \f

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Possible merge conflict in src/macterm.[ch]
  2008-01-23  0:05 Possible merge conflict in src/macterm.[ch] Miles Bader
@ 2008-01-27 22:08 ` Andreas Tobler
  2008-01-28 18:51   ` Andreas Tobler
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Tobler @ 2008-01-27 22:08 UTC (permalink / raw)
  To: Miles Bader; +Cc: YAMAMOTO Mitsuharu, emacs-devel

Miles Bader wrote:
> Hi,
> 
> I merged the appended changes to macterm.[ch] from the Emacs 22 release
> branch to the trunk.  As there were merge conflicts, and apparently some
> trunk changes touched the same code, it seems likely that either this
> change shouldn't have been merged, or that I incorrectly resolved the
> conflict.
> 
> Please check the state of macterm.[ch] in the trunk and make sure it is
> correct.
> 
> [The appended ChangeLog entry is the original, but the diff is the
> change I applied to the trunk, after I tried to fix the conflicts.]


It's wrong or at least incomplete. Only the .c is merged. I guess the .h 
needs a merge as well.

I try to figure out what's missing.

Andreas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Possible merge conflict in src/macterm.[ch]
  2008-01-27 22:08 ` Andreas Tobler
@ 2008-01-28 18:51   ` Andreas Tobler
  2008-01-29  5:19     ` Miles Bader
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Tobler @ 2008-01-28 18:51 UTC (permalink / raw)
  To: Miles Bader; +Cc: YAMAMOTO Mitsuharu, emacs-devel

Andreas Tobler wrote:
> Miles Bader wrote:
>> Hi,
>>
>> I merged the appended changes to macterm.[ch] from the Emacs 22 release
>> branch to the trunk.  As there were merge conflicts, and apparently some
>> trunk changes touched the same code, it seems likely that either this
>> change shouldn't have been merged, or that I incorrectly resolved the
>> conflict.
>>
>> Please check the state of macterm.[ch] in the trunk and make sure it is
>> correct.
>>
>> [The appended ChangeLog entry is the original, but the diff is the
>> change I applied to the trunk, after I tried to fix the conflicts.]
> 
> 
> It's wrong or at least incomplete. Only the .c is merged. I guess the .h 
> needs a merge as well.
> 
> I try to figure out what's missing.

This one fixes bootstrap on OS-X 10.5.1 for me:

Index: macterm.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/macterm.c,v
retrieving revision 1.242
diff -u -r1.242 macterm.c
--- macterm.c	22 Jan 2008 23:53:38 -0000	1.242
+++ macterm.c	28 Jan 2008 18:50:42 -0000
@@ -5300,7 +5300,7 @@
  #if USE_CG_DRAWING
  	      mac_prepare_for_quickdraw (f);
  #endif
-	      Draw1Control (SCROLL_BAR_CONTROL_HANDLE (bar));
+	      Draw1Control (SCROLL_BAR_CONTROL_REF (bar));
  	    }
  	}
        else


Andreas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Possible merge conflict in src/macterm.[ch]
  2008-01-28 18:51   ` Andreas Tobler
@ 2008-01-29  5:19     ` Miles Bader
  0 siblings, 0 replies; 4+ messages in thread
From: Miles Bader @ 2008-01-29  5:19 UTC (permalink / raw)
  To: Andreas Tobler; +Cc: YAMAMOTO Mitsuharu, emacs-devel

Andreas Tobler <andreast-list@fgznet.ch> writes:
> This one fixes bootstrap on OS-X 10.5.1 for me:
>
> Index: macterm.c

Thanks!

[I received an identical patch from Yuji Yamano <yyamano@kt.rim.or.jp>]

-Miles

-- 
The car has become... an article of dress without which we feel uncertain,
unclad, and incomplete.  [Marshall McLuhan, Understanding Media, 1964]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-01-29  5:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-23  0:05 Possible merge conflict in src/macterm.[ch] Miles Bader
2008-01-27 22:08 ` Andreas Tobler
2008-01-28 18:51   ` Andreas Tobler
2008-01-29  5:19     ` Miles Bader

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).