From 43b652c58144f14554f5df45e2da05f72a2c5123 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 1 Oct 2000 02:15:58 +0000 Subject: [PATCH] In X-WINDOW-CLEAR, if the clip rectangle is disabled, call XClearWindow rather than XClearArea. This clears pixels in internal border, if any. --- v7/src/microcode/x11base.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/v7/src/microcode/x11base.c b/v7/src/microcode/x11base.c index e43730280..a3f9c2f64 100644 --- a/v7/src/microcode/x11base.c +++ b/v7/src/microcode/x11base.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: x11base.c,v 1.74 2000/01/18 05:11:37 cph Exp $ +$Id: x11base.c,v 1.75 2000/10/01 02:15:58 cph Exp $ Copyright (c) 1989-2000 Massachusetts Institute of Technology @@ -1587,13 +1587,19 @@ DEFINE_PRIMITIVE ("X-WINDOW-CLEAR", Prim_x_window_clear, 1, 1, 0) PRIMITIVE_HEADER (1); { struct xwindow * xw = (x_window_arg (1)); - XClearArea ((XW_DISPLAY (xw)), - (XW_WINDOW (xw)), - ((XW_CLIP_X (xw)) + (XW_INTERNAL_BORDER_WIDTH (xw))), - ((XW_CLIP_Y (xw)) + (XW_INTERNAL_BORDER_WIDTH (xw))), - (XW_CLIP_WIDTH (xw)), - (XW_CLIP_HEIGHT (xw)), - False); + if (((XW_CLIP_X (xw)) == 0) + && ((XW_CLIP_Y (xw)) == 0) + && ((XW_CLIP_WIDTH (xw)) == (XW_X_SIZE (xw))) + && ((XW_CLIP_HEIGHT (xw)) == (XW_Y_SIZE (xw)))) + XClearWindow ((XW_DISPLAY (xw)), (XW_WINDOW (xw))); + else + XClearArea ((XW_DISPLAY (xw)), + (XW_WINDOW (xw)), + ((XW_CLIP_X (xw)) + (XW_INTERNAL_BORDER_WIDTH (xw))), + ((XW_CLIP_Y (xw)) + (XW_INTERNAL_BORDER_WIDTH (xw))), + (XW_CLIP_WIDTH (xw)), + (XW_CLIP_HEIGHT (xw)), + False); } PRIMITIVE_RETURN (UNSPECIFIC); } -- 2.25.1