diff options
author | Havoc Pennington <hp@redhat.com> | 2001-03-02 20:02:17 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2001-03-02 20:02:17 +0000 |
commit | 8860615d9a41a550ad830c78a6d2dd63340e0f1d (patch) | |
tree | a37fa2b7bbf51a08d8744d0540e5f3f5be0ee86b /gdk/x11/gdkgc-x11.c | |
parent | b0052ec843ab9acc77408d256a5a43d4332f0a70 (diff) | |
download | gtk+-8860615d9a41a550ad830c78a6d2dd63340e0f1d.tar.gz |
use _gdk_region_get_xrectangles()
2001-03-02 Havoc Pennington <hp@redhat.com>
* gdk/x11/gdkgc-x11.c (_gdk_x11_gc_flush): use
_gdk_region_get_xrectangles()
* gdk/x11/gdkmain-x11.c (_gdk_region_get_xrectangles): new function
* gtk/testgtk.c (create_shapes): add test for shape_combine_region
* gdk/x11/gdkwindow-x11.c (gdk_window_shape_combine_region): new
function, contributed by Ron Steinke
* gdk/x11/gdkevents-x11.c (gdk_wmspec_supported): rename
gdk_net_wm_supports
* gdk/gdkregion-generic.c (gdk_region_get_rectangles):
New function, contributed by Ron Steinke
* gtk/gtkentry.c (gtk_entry_get_layout_offsets): New function,
used to line up the text in the entry when using the entry for
editable sheet cell hacks
* gtk/testgtk.c (create_entry): test the activate_default setting
on GtkEntry
* gtk/gtkentry.c (gtk_entry_set_activates_default): New function to
cause the entry to activate the default button for a dialog when
activated
(gtk_entry_get_activates_default): new function
Diffstat (limited to 'gdk/x11/gdkgc-x11.c')
-rw-r--r-- | gdk/x11/gdkgc-x11.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/gdk/x11/gdkgc-x11.c b/gdk/x11/gdkgc-x11.c index 8d3dcdae49..34f90a0d28 100644 --- a/gdk/x11/gdkgc-x11.c +++ b/gdk/x11/gdkgc-x11.c @@ -190,21 +190,19 @@ _gdk_x11_gc_flush (GdkGC *gc) gc->clip_x_origin, gc->clip_y_origin); else { - XRectangle *rectangles = g_new (XRectangle, private->clip_region->numRects); - GdkRegionBox *boxes = private->clip_region->rects; - int i; - - for (i=0; i<private->clip_region->numRects; i++) - { - rectangles[i].x = CLAMP (boxes[i].x1 + gc->clip_x_origin, G_MINSHORT, G_MAXSHORT); - rectangles[i].y = CLAMP (boxes[i].y1 + gc->clip_y_origin, G_MINSHORT, G_MAXSHORT); - rectangles[i].width = CLAMP (boxes[i].x2 + gc->clip_x_origin, G_MINSHORT, G_MAXSHORT) - rectangles[i].x; - rectangles[i].height = CLAMP (boxes[i].y2 + gc->clip_y_origin, G_MINSHORT, G_MAXSHORT) - rectangles[i].y; - } + XRectangle *rectangles; + gint n_rects; + + _gdk_region_get_xrectangles (private->clip_region, + gc->clip_x_origin, + gc->clip_y_origin, + &rectangles, + &n_rects); - XSetClipRectangles(GDK_GC_XDISPLAY (gc), GDK_GC_XGC (gc), 0, 0, rectangles, - private->clip_region->numRects, YXBanded); - + XSetClipRectangles (GDK_GC_XDISPLAY (gc), GDK_GC_XGC (gc), 0, 0, + rectangles, + n_rects, YXBanded); + g_free (rectangles); } } |