changeset 33606:01f87b0ff56f

(x_set_toolkit_scroll_bar_thumb, x_scroll_bar_create) (x_scroll_bar_remove, XTset_vertical_scroll_bar): Call SCROLL_BAR_X_WIDGET with addtional argument DPY.
author Gerd Moellmann <gerd@gnu.org>
date Sun, 19 Nov 2000 00:29:21 +0000
parents f41b5f5154b1
children 340b067073a5
files src/xterm.c
diffstat 1 files changed, 13 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Sun Nov 19 00:28:46 2000 +0000
+++ b/src/xterm.c	Sun Nov 19 00:29:21 2000 +0000
@@ -8127,8 +8127,9 @@
      struct scroll_bar *bar;
      int portion, position, whole;
 {
+  struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
+  Widget widget = SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar);
   float top, shown;
-  Widget widget = SCROLL_BAR_X_WIDGET (bar);
 
   if (whole == 0)
     top = 0, shown = 1;
@@ -8339,12 +8340,15 @@
 
   /* Map the window/widget.  */
 #if USE_TOOLKIT_SCROLL_BARS
-  XtConfigureWidget (SCROLL_BAR_X_WIDGET (bar),
+ {
+   Widget scroll_bar = SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar);
+   XtConfigureWidget (scroll_bar,
 		     left + VERTICAL_SCROLL_BAR_WIDTH_TRIM,
 		     top,
 		     width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2,
 		     height, 0);
-  XtMapWidget (SCROLL_BAR_X_WIDGET (bar));
+   XtMapWidget (scroll_bar);
+ }
 #else /* not USE_TOOLKIT_SCROLL_BARS */
   XMapRaised (FRAME_X_DISPLAY (f), SCROLL_BAR_X_WINDOW (bar));
 #endif /* not USE_TOOLKIT_SCROLL_BARS */
@@ -8477,16 +8481,14 @@
 x_scroll_bar_remove (bar)
      struct scroll_bar *bar;
 {
+  struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
   BLOCK_INPUT;
 
 #if USE_TOOLKIT_SCROLL_BARS
-  XtDestroyWidget (SCROLL_BAR_X_WIDGET (bar));
-#else /* not USE_TOOLKIT_SCROLL_BARS */
-  {
-    FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
-    XDestroyWindow (FRAME_X_DISPLAY (f), SCROLL_BAR_X_WINDOW (bar));
-  }
-#endif /* not USE_TOOLKIT_SCROLL_BARS */
+  XtDestroyWidget (SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar));
+#else
+  XDestroyWindow (FRAME_X_DISPLAY (f), SCROLL_BAR_X_WINDOW (bar));
+#endif
   
   /* Disassociate this scroll bar from its window.  */
   XWINDOW (bar->window)->vertical_scroll_bar = Qnil;
@@ -8580,7 +8582,7 @@
 
       /* Move/size the scroll bar widget.  */
       if (mask)
-	XtConfigureWidget (SCROLL_BAR_X_WIDGET (bar),
+	XtConfigureWidget (SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar),
 			   sb_left + VERTICAL_SCROLL_BAR_WIDTH_TRIM,
 			   top,
 			   sb_width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2,