#| -*-Scheme-*-
-$Id: xterm.scm,v 1.74 2005/11/12 22:31:01 cph Exp $
+$Id: xterm.scm,v 1.75 2006/02/15 05:10:00 cph Exp $
Copyright 1989,1990,1991,1992,1993,1995 Massachusetts Institute of Technology
Copyright 1996,1998,1999,2000,2001,2002 Massachusetts Institute of Technology
-Copyright 2003,2005 Massachusetts Institute of Technology
+Copyright 2003,2005,2006 Massachusetts Institute of Technology
This file is part of MIT/GNU Scheme.
(let ((xterm (screen-xterm screen))
(x-size (vector-ref event 2))
(y-size (vector-ref event 3)))
- (xterm-reconfigure xterm x-size y-size)
(let ((x-size (xterm-map-x-size xterm x-size))
(y-size (xterm-map-y-size xterm y-size)))
+ (xterm-reconfigure xterm x-size y-size)
(if (not (and (= x-size (screen-x-size screen))
(= y-size (screen-y-size screen))))
(begin
/* -*-C-*-
-$Id: x11term.c,v 1.31 2005/11/13 03:45:59 cph Exp $
+$Id: x11term.c,v 1.32 2006/02/15 05:09:50 cph Exp $
Copyright 1989,1990,1991,1992,1993,1995 Massachusetts Institute of Technology
-Copyright 2000,2005 Massachusetts Institute of Technology
+Copyright 2000,2005,2006 Massachusetts Institute of Technology
This file is part of MIT/GNU Scheme.
static void
DEFUN (xterm_reconfigure, (xw, width, height),
struct xwindow * xw AND
- unsigned int width AND
- unsigned int height)
+ unsigned int x_csize AND
+ unsigned int y_csize)
{
- 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))))
+ if ((x_csize != (XW_X_CSIZE (xw))) || (y_csize != (XW_Y_CSIZE (xw))))
{
- unsigned int x_csize = (x_size / (FONT_WIDTH (XW_FONT (xw))));
- unsigned int y_csize = (y_size / (FONT_HEIGHT (XW_FONT (xw))));
char * new_char_map = (x_malloc (x_csize * y_csize));
char * new_hl_map = (x_malloc (x_csize * y_csize));
unsigned int old_x_csize = (XW_X_CSIZE (xw));
}
free (XW_CHARACTER_MAP (xw));
free (XW_HIGHLIGHT_MAP (xw));
- (XW_X_SIZE (xw)) = x_size;
- (XW_Y_SIZE (xw)) = y_size;
- (XW_CLIP_X (xw)) = 0;
- (XW_CLIP_Y (xw)) = 0;
- (XW_CLIP_WIDTH (xw)) = x_size;
- (XW_CLIP_HEIGHT (xw)) = y_size;
+ {
+ unsigned int x_size = (XTERM_X_PIXEL (xw, x_csize));
+ unsigned int y_size = (XTERM_Y_PIXEL (xw, x_csize));
+ (XW_X_SIZE (xw)) = x_size;
+ (XW_Y_SIZE (xw)) = y_size;
+ (XW_CLIP_X (xw)) = 0;
+ (XW_CLIP_Y (xw)) = 0;
+ (XW_CLIP_WIDTH (xw)) = x_size;
+ (XW_CLIP_HEIGHT (xw)) = y_size;
+ }
(XW_X_CSIZE (xw)) = x_csize;
(XW_Y_CSIZE (xw)) = y_csize;
(XW_CHARACTER_MAP (xw))= new_char_map;