gdk/gdkgc.c: If gdk_gc_set_clip_rectangle is called with

rectangle = NULL, remove clip mask, instead of segfaulting.
gtk/gtknotebook.c: Set clip mask before redrawing, so that
  we don't overwrite things outside of exposed areas when
  drawing the shadows. (Based on a patch from
  Lars Hamann <hamann@braunschweig.netsurf.de> and Stefan Jeske)

                                        -owt
This commit is contained in:
Owen Taylor
1997-12-12 20:03:48 +00:00
parent 30e8968f3b
commit d30343b9d9
2 changed files with 37 additions and 8 deletions

View File

@ -535,13 +535,18 @@ gdk_gc_set_clip_rectangle (GdkGC *gc,
private = (GdkGCPrivate*) gc;
xrectangle.x = rectangle->x;
xrectangle.y = rectangle->y;
xrectangle.width = rectangle->width;
xrectangle.height = rectangle->height;
XSetClipRectangles (private->xdisplay, private->xgc, 0, 0,
&xrectangle, 1, Unsorted);
if (rectangle)
{
xrectangle.x = rectangle->x;
xrectangle.y = rectangle->y;
xrectangle.width = rectangle->width;
xrectangle.height = rectangle->height;
XSetClipRectangles (private->xdisplay, private->xgc, 0, 0,
&xrectangle, 1, Unsorted);
}
else
XSetClipMask (private->xdisplay, private->xgc, None);
}
void