This is an incompatible change that requires runtime 14.164. This
authorChris Hanson <org/chris-hanson/cph>
Wed, 8 Sep 1993 22:37:07 +0000 (22:37 +0000)
committerChris Hanson <org/chris-hanson/cph>
Wed, 8 Sep 1993 22:37:07 +0000 (22:37 +0000)
change affects only the X11 graphics interface.

Change handling of Configure events so that the runtime system
receives them and instructs the microcode to do the reconfiguration.
This is necessary to get correct synchronization of these events.

v7/src/microcode/version.h
v7/src/microcode/x11graph.c
v8/src/microcode/version.h

index 31379c2eedc9e79ac27d68328ee93e8d462403cd..dfc9fb67be2b2fa42a6eb9bd31dd49e58a4c2d8a 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: version.h,v 11.141 1993/09/01 18:49:05 gjr Exp $
+$Id: version.h,v 11.142 1993/09/08 22:37:07 cph Exp $
 
 Copyright (c) 1988-1993 Massachusetts Institute of Technology
 
@@ -46,5 +46,5 @@ MIT in each case. */
 #define VERSION                11
 #endif
 #ifndef SUBVERSION
-#define SUBVERSION     141
+#define SUBVERSION     142
 #endif
index 5a09ea781e7d4c8f7b78fb506c2fbe783119a6c4..7fa984182c9995704a54148b53182aac1fcf1ca6 100644 (file)
@@ -1,8 +1,8 @@
 /* -*-C-*-
 
-$Id: x11graph.c,v 1.30 1993/06/24 07:10:31 gjr Exp $
+$Id: x11graph.c,v 1.31 1993/09/08 22:37:01 cph Exp $
 
-Copyright (c) 1989-92 Massachusetts Institute of Technology
+Copyright (c) 1989-93 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -238,25 +238,35 @@ DEFUN (process_event, (xw, event),
        struct xwindow * xw AND
        XEvent * event)
 {
-  switch (event -> type)
+}
+
+static void
+DEFUN (reconfigure, (xw, width, height),
+       struct xwindow * xw AND
+       unsigned int width AND
+       unsigned int height)
+{
+  unsigned int extra = (2 * (XW_INTERNAL_BORDER_WIDTH (xw)));
+  unsigned int x_size = ((width < extra) ? 0 : (width - extra));
+  unsigned int y_size = ((height < extra) ? 0 : (height - extra));
+  if ((x_size != (XW_X_SIZE (xw))) || (y_size != (XW_Y_SIZE (xw))))
     {
-    case ConfigureNotify:
-      {
-       unsigned int extra = (2 * (XW_INTERNAL_BORDER_WIDTH (xw)));
-       unsigned int x_size = (((event -> xconfigure) . width) - extra);
-       unsigned int y_size = (((event -> xconfigure) . height) - extra);
-       if ((x_size != (XW_X_SIZE (xw))) || (y_size != (XW_Y_SIZE (xw))))
-         {
-           (XW_X_SIZE (xw)) = x_size;
-           (XW_Y_SIZE (xw)) = y_size;
-           reset_virtual_device_coordinates (xw);
-           XClearWindow ((XW_DISPLAY (xw)), (XW_WINDOW (xw)));
-         }
-      }
-      break;
+      (XW_X_SIZE (xw)) = x_size;
+      (XW_Y_SIZE (xw)) = y_size;
+      reset_virtual_device_coordinates (xw);
+      XClearWindow ((XW_DISPLAY (xw)), (XW_WINDOW (xw)));
     }
 }
 
+DEFINE_PRIMITIVE ("X-GRAPHICS-RECONFIGURE", Prim_x_graphics_reconfigure, 3, 3, 0)
+{
+  PRIMITIVE_HEADER (3);
+  reconfigure ((x_window_arg (1)),
+              (arg_nonnegative_integer (2)),
+              (arg_nonnegative_integer (3)));
+  PRIMITIVE_RETURN (UNSPECIFIC);
+}
+
 static void
 DEFUN (wm_set_size_hint, (xw, geometry_mask, x, y),
        struct xwindow * xw AND
index 31379c2eedc9e79ac27d68328ee93e8d462403cd..dfc9fb67be2b2fa42a6eb9bd31dd49e58a4c2d8a 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: version.h,v 11.141 1993/09/01 18:49:05 gjr Exp $
+$Id: version.h,v 11.142 1993/09/08 22:37:07 cph Exp $
 
 Copyright (c) 1988-1993 Massachusetts Institute of Technology
 
@@ -46,5 +46,5 @@ MIT in each case. */
 #define VERSION                11
 #endif
 #ifndef SUBVERSION
-#define SUBVERSION     141
+#define SUBVERSION     142
 #endif