changeset 53083:bf86de5f6d07

* xterm.c (x_window_to_scroll_bar): Move check of display to where window_id is compared.
author Jan Djärv <jan.h.d@swipnet.se>
date Mon, 17 Nov 2003 06:06:24 +0000
parents 1b62d2b8774f
children 75b1b35bd247
files src/ChangeLog src/xterm.c
diffstat 2 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Nov 17 05:25:52 2003 +0000
+++ b/src/ChangeLog	Mon Nov 17 06:06:24 2003 +0000
@@ -1,3 +1,8 @@
+2003-11-17  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>
+
+	* xterm.c (x_window_to_scroll_bar): Move check of display to
+	where window_id is compared.
+
 2003-11-17  Kim F. Storm  <storm@cua.dk>
 
 	* dispextern.h (struct it): New member first_vpos.
--- a/src/xterm.c	Mon Nov 17 05:25:52 2003 +0000
+++ b/src/xterm.c	Mon Nov 17 06:06:24 2003 +0000
@@ -3877,9 +3877,6 @@
       if (! GC_FRAMEP (frame))
 	abort ();
 
-      if (FRAME_X_DISPLAY (XFRAME (frame)) != display)
-        continue;
-
       /* Scan this frame's scroll bar list for a scroll bar with the
          right window ID.  */
       condemned = FRAME_CONDEMNED_SCROLL_BARS (XFRAME (frame));
@@ -3890,7 +3887,8 @@
 			       condemned = Qnil,
 			       ! GC_NILP (bar));
 	   bar = XSCROLL_BAR (bar)->next)
-	if (SCROLL_BAR_X_WINDOW (XSCROLL_BAR (bar)) == window_id)
+	if (SCROLL_BAR_X_WINDOW (XSCROLL_BAR (bar)) == window_id &&
+            FRAME_X_DISPLAY (XFRAME (frame)) == display)
 	  return XSCROLL_BAR (bar);
     }