From 2d7bdb844c4baf3ff58be64572f5b447e374c286 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 8 Sep 1993 22:37:07 +0000 Subject: [PATCH] This is an incompatible change that requires runtime 14.164. This 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 | 4 ++-- v7/src/microcode/x11graph.c | 44 +++++++++++++++++++++++-------------- v8/src/microcode/version.h | 4 ++-- 3 files changed, 31 insertions(+), 21 deletions(-) diff --git a/v7/src/microcode/version.h b/v7/src/microcode/version.h index 31379c2ee..dfc9fb67b 100644 --- a/v7/src/microcode/version.h +++ b/v7/src/microcode/version.h @@ -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 diff --git a/v7/src/microcode/x11graph.c b/v7/src/microcode/x11graph.c index 5a09ea781..7fa984182 100644 --- a/v7/src/microcode/x11graph.c +++ b/v7/src/microcode/x11graph.c @@ -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 diff --git a/v8/src/microcode/version.h b/v8/src/microcode/version.h index 31379c2ee..dfc9fb67b 100644 --- a/v8/src/microcode/version.h +++ b/v8/src/microcode/version.h @@ -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 -- 2.25.1