manager's "normal" hints, so that subsequent resizing works properly.
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/x11.h,v 1.12 1992/02/10 21:09:03 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/x11.h,v 1.13 1992/02/11 18:57:46 cph Exp $
Copyright (c) 1989-92 Massachusetts Institute of Technology
typedef void EXFUN ((*x_event_processor_t), (struct xwindow *, XEvent *));
typedef SCHEME_OBJECT EXFUN
((*x_coordinate_map_t), (struct xwindow *, unsigned int));
+typedef void EXFUN ((*x_update_normal_hints_t), (struct xwindow *));
struct xwindow_methods
{
/* Procedures to map coordinates to Scheme objects. */
x_coordinate_map_t x_coordinate_map;
x_coordinate_map_t y_coordinate_map;
+
+ /* Procedure that is called to inform the window manager of
+ adjustments to the window's internal border or font. */
+ x_update_normal_hints_t update_normal_hints;
};
\f
struct xwindow
#define XW_EVENT_PROCESSOR(xw) (((xw) -> methods) . event_processor)
#define XW_X_COORDINATE_MAP(xw) (((xw) -> methods) . x_coordinate_map)
#define XW_Y_COORDINATE_MAP(xw) (((xw) -> methods) . y_coordinate_map)
+#define XW_UPDATE_NORMAL_HINTS(xw) (((xw) -> methods) . update_normal_hints)
#define XW_EVENT_MASK(xw) ((xw) -> event_mask)
#define XW_TO_OBJECT(xw) (LONG_TO_UNSIGNED_FIXNUM (XW_ALLOCATION_INDEX (xw)))
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/x11base.c,v 1.35 1992/02/10 21:29:27 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/x11base.c,v 1.36 1992/02/11 18:57:51 cph Exp $
Copyright (c) 1989-92 Massachusetts Institute of Technology
XSetFont (display, (XW_REVERSE_GC (xw)), fid);
XSetFont (display, (XW_CURSOR_GC (xw)), fid);
}
+ if ((XW_UPDATE_NORMAL_HINTS (xw)) != 0)
+ (* (XW_UPDATE_NORMAL_HINTS (xw))) (xw);
}
PRIMITIVE_RETURN (SHARP_T);
}
PRIMITIVE_HEADER (2);
{
struct xwindow * xw = (x_window_arg (1));
- Display * display = (XW_DISPLAY (xw));
unsigned int internal_border_width = (arg_nonnegative_integer (2));
(XW_INTERNAL_BORDER_WIDTH (xw)) = internal_border_width;
+ if ((XW_UPDATE_NORMAL_HINTS (xw)) != 0)
+ (* (XW_UPDATE_NORMAL_HINTS (xw))) (xw);
XResizeWindow
- (display,
+ ((XW_DISPLAY (xw)),
(XW_WINDOW (xw)),
((XW_X_SIZE (xw)) + (2 * internal_border_width)),
((XW_Y_SIZE (xw)) + (2 * internal_border_width)));
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/x11graph.c,v 1.20 1992/02/10 21:10:14 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/x11graph.c,v 1.21 1992/02/11 18:57:58 cph Exp $
Copyright (c) 1989-92 Massachusetts Institute of Technology
(methods . event_processor) = process_event;
(methods . x_coordinate_map) = x_coordinate_map;
(methods . y_coordinate_map) = y_coordinate_map;
+ (methods . update_normal_hints) = 0;
{
unsigned int extra = (2 * (attributes . internal_border_width));
int x_pos = (-1);
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/x11term.c,v 1.17 1992/02/10 21:09:52 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/x11term.c,v 1.18 1992/02/11 18:58:03 cph Exp $
Copyright (c) 1989-92 Massachusetts Institute of Technology
XFree ((caddr_t) size_hints);
}
+static void
+DEFUN (xterm_update_normal_hints, (xw), struct xwindow * xw)
+{
+ xterm_set_wm_normal_hints (xw, 0, 0, 0);
+}
+
static void
DEFUN (xterm_deallocate, (xw), struct xwindow * xw)
{
(XW_CHARACTER_MAP (xw))= new_char_map;
(XW_HIGHLIGHT_MAP (xw))= new_hl_map;
xterm_dump_contents (xw, 0, 0, x_csize, y_csize);
- xterm_set_wm_normal_hints (xw, 0, 0, 0);
+ xterm_update_normal_hints (xw);
XFlush (XW_DISPLAY (xw));
}
}
(methods . event_processor) = xterm_process_event;
(methods . x_coordinate_map) = xterm_x_coordinate_map;
(methods . y_coordinate_map) = xterm_y_coordinate_map;
+ (methods . update_normal_hints) = xterm_update_normal_hints;
{
unsigned int extra = (2 * (attributes . internal_border_width));
int x_pos = (-1);
xw = (x_window_arg (1));
extra = (2 * (XW_INTERNAL_BORDER_WIDTH (xw)));
font = (XW_FONT (xw));
- /* Update the WM normal hints so they have the latest values for
- font dimensions and internal border width. */
- xterm_set_wm_normal_hints (xw, 0, 0, 0);
XResizeWindow
((XW_DISPLAY (xw)),
(XW_WINDOW (xw)),