diff src/xterm.c @ 1810:bf618128d973

* xterm.c (x_scrollbar_create): Set the scrollbars to use EastGravity. * frame.c (Fdelete_frame): Clear the frame's display after calling the window-system-dependent frame destruction routine. We no longer need to pass the display as a separate argument to x_destroy_window. * xterm.c (x_destroy_window): Put the code which clears out f's display here, right after we free the storage it points to. Put everything, including the code which clears x_focus_frame and x_highlight_frame, inside the BLOCK/UNBLOCK_INPUT pair.
author Jim Blandy <jimb@redhat.com>
date Fri, 22 Jan 1993 02:47:12 +0000
parents 5752a95053f2
children 04fb1d3d6992
line wrap: on
line diff
--- a/src/xterm.c	Fri Jan 22 02:45:16 1993 +0000
+++ b/src/xterm.c	Fri Jan 22 02:47:12 1993 +0000
@@ -1758,8 +1758,9 @@
 		    | ButtonMotionMask | PointerMotionHintMask
 		    | ExposureMask);
     a.cursor = x_vertical_scrollbar_cursor;
-
-    mask = (CWBackPixel | CWEventMask | CWCursor);
+    a.win_gravity = EastGravity;
+
+    mask = (CWBackPixel | CWEventMask | CWCursor | CWWinGravity);
 
     SET_SCROLLBAR_X_WINDOW
       (bar, 
@@ -4061,28 +4062,26 @@
   UNBLOCK_INPUT;
 }
 
-/* Destroy the X window of frame F.
-   DISPL is the former f->display (since f->display
-   has already been nulled out).  */
-
-x_destroy_window (f, displ)
+/* Destroy the X window of frame F.  */
+
+x_destroy_window (f)
      struct frame *f;
-     union display displ;
 {
-  int mask;
-
   BLOCK_INPUT;
-  if (displ.x->icon_desc != 0)
-    XDestroyWindow (XDISPLAY displ.x->icon_desc);
-  XDestroyWindow (XDISPLAY displ.x->window_desc);
+
+  if (f->display.x->icon_desc != 0)
+    XDestroyWindow (XDISPLAY f->display.x->icon_desc);
+  XDestroyWindow (XDISPLAY f->display.x->window_desc);
   XFlushQueue ();
-  UNBLOCK_INPUT;
-
-  free (displ.x);
+
+  free (f->display.x);
+  f->display.x = 0;
   if (f == x_focus_frame)
     x_focus_frame = 0;
   if (f == x_highlight_frame)
     x_highlight_frame = 0;
+
+  UNBLOCK_INPUT;
 }
 
 /* Manage event queues for X10.  */