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:
19
gdk/gdkgc.c
19
gdk/gdkgc.c
@ -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
|
||||
|
||||
Reference in New Issue
Block a user