aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Djärv <[email protected]>2003-11-17 06:06:24 +0000
committerJan Djärv <[email protected]>2003-11-17 06:06:24 +0000
commita0c6ef2d968c18ade478b6003f64e5a04dd759fb (patch)
tree835cb31564a01b94265e9947532e112fa5e29388
parent7d00398c524e6fa7d3f3ac11a51a0124da3d6db3 (diff)
* xterm.c (x_window_to_scroll_bar): Move check of display to
where window_id is compared.
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xterm.c6
2 files changed, 7 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index acbaf09b69..9d7197dc6e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2003-11-17 Jan Dj,Ad(Brv <[email protected]>
+
+ * xterm.c (x_window_to_scroll_bar): Move check of display to
+ where window_id is compared.
+
2003-11-17 Kim F. Storm <[email protected]>
* dispextern.h (struct it): New member first_vpos.
diff --git a/src/xterm.c b/src/xterm.c
index a5f6c959ce..a311784670 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -3877,9 +3877,6 @@ x_window_to_scroll_bar (display, window_id)
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 @@ x_window_to_scroll_bar (display, window_id)
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);
}