Now accepts an extra "clip" parameter, which is the clipping rectangle to

1998-06-16  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* gtk/gtkhandlebox.c (draw_textured_frame): Now accepts an extra
	"clip" parameter, which is the clipping rectangle to use.  This
	eliminates the extremely annoying flicker when exposing parts of
	the handlebox.
This commit is contained in:
Federico Mena Quintero 1998-06-17 03:34:22 +00:00 committed by Arturo Espinosa
parent b7f7f3d98d
commit ed1e531c36
8 changed files with 81 additions and 27 deletions

View File

@ -1,3 +1,10 @@
1998-06-16 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkhandlebox.c (draw_textured_frame): Now accepts an extra
"clip" parameter, which is the clipping rectangle to use. This
eliminates the extremely annoying flicker when exposing parts of
the handlebox.
Tue Jun 16 14:08:08 PDT 1998 Manish Singh <yosh@gimp.org>
* gtk/gtktable.c: fix from TimJ for off-by-one error in table

View File

@ -1,3 +1,10 @@
1998-06-16 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkhandlebox.c (draw_textured_frame): Now accepts an extra
"clip" parameter, which is the clipping rectangle to use. This
eliminates the extremely annoying flicker when exposing parts of
the handlebox.
Tue Jun 16 14:08:08 PDT 1998 Manish Singh <yosh@gimp.org>
* gtk/gtktable.c: fix from TimJ for off-by-one error in table

View File

@ -1,3 +1,10 @@
1998-06-16 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkhandlebox.c (draw_textured_frame): Now accepts an extra
"clip" parameter, which is the clipping rectangle to use. This
eliminates the extremely annoying flicker when exposing parts of
the handlebox.
Tue Jun 16 14:08:08 PDT 1998 Manish Singh <yosh@gimp.org>
* gtk/gtktable.c: fix from TimJ for off-by-one error in table

View File

@ -1,3 +1,10 @@
1998-06-16 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkhandlebox.c (draw_textured_frame): Now accepts an extra
"clip" parameter, which is the clipping rectangle to use. This
eliminates the extremely annoying flicker when exposing parts of
the handlebox.
Tue Jun 16 14:08:08 PDT 1998 Manish Singh <yosh@gimp.org>
* gtk/gtktable.c: fix from TimJ for off-by-one error in table

View File

@ -1,3 +1,10 @@
1998-06-16 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkhandlebox.c (draw_textured_frame): Now accepts an extra
"clip" parameter, which is the clipping rectangle to use. This
eliminates the extremely annoying flicker when exposing parts of
the handlebox.
Tue Jun 16 14:08:08 PDT 1998 Manish Singh <yosh@gimp.org>
* gtk/gtktable.c: fix from TimJ for off-by-one error in table

View File

@ -1,3 +1,10 @@
1998-06-16 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkhandlebox.c (draw_textured_frame): Now accepts an extra
"clip" parameter, which is the clipping rectangle to use. This
eliminates the extremely annoying flicker when exposing parts of
the handlebox.
Tue Jun 16 14:08:08 PDT 1998 Manish Singh <yosh@gimp.org>
* gtk/gtktable.c: fix from TimJ for off-by-one error in table

View File

@ -1,3 +1,10 @@
1998-06-16 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkhandlebox.c (draw_textured_frame): Now accepts an extra
"clip" parameter, which is the clipping rectangle to use. This
eliminates the extremely annoying flicker when exposing parts of
the handlebox.
Tue Jun 16 14:08:08 PDT 1998 Manish Singh <yosh@gimp.org>
* gtk/gtktable.c: fix from TimJ for off-by-one error in table

View File

@ -611,44 +611,49 @@ gtk_handle_box_draw_ghost (GtkHandleBox *hb)
}
static void
draw_textured_frame (GtkWidget *widget, GdkWindow *window, GdkRectangle *rect, GtkShadowType shadow)
draw_textured_frame (GtkWidget *widget, GdkWindow *window, GdkRectangle *rect, GtkShadowType shadow,
GdkRectangle *clip)
{
int x, y;
int xthick, ythick;
GdkGC *light_gc, *dark_gc;
GdkRectangle dest;
gdk_draw_rectangle (window,
widget->style->bg_gc[GTK_STATE_NORMAL],
TRUE,
rect->x, rect->y,
rect->width, rect->height);
if (gdk_rectangle_intersect (rect, clip, &dest))
{
gdk_draw_rectangle (window,
widget->style->bg_gc[GTK_STATE_NORMAL],
TRUE,
dest.x, dest.y,
dest.width, dest.height);
light_gc = widget->style->light_gc[GTK_STATE_NORMAL];
dark_gc = widget->style->dark_gc[GTK_STATE_NORMAL];
light_gc = widget->style->light_gc[GTK_STATE_NORMAL];
dark_gc = widget->style->dark_gc[GTK_STATE_NORMAL];
xthick = widget->style->klass->xthickness;
ythick = widget->style->klass->ythickness;
xthick = widget->style->klass->xthickness;
ythick = widget->style->klass->ythickness;
gdk_gc_set_clip_rectangle (light_gc, rect);
gdk_gc_set_clip_rectangle (dark_gc, rect);
gdk_gc_set_clip_rectangle (light_gc, &dest);
gdk_gc_set_clip_rectangle (dark_gc, &dest);
for (y = rect->y + ythick; y < (rect->y + rect->height - ythick); y += 3)
for (x = rect->x + xthick; x < (rect->x + rect->width - xthick); x += 6)
{
gdk_draw_point (window, light_gc, x, y);
gdk_draw_point (window, dark_gc, x + 1, y + 1);
for (y = rect->y + ythick; y < (rect->y + rect->height - ythick); y += 3)
for (x = rect->x + xthick; x < (rect->x + rect->width - xthick); x += 6)
{
gdk_draw_point (window, light_gc, x, y);
gdk_draw_point (window, dark_gc, x + 1, y + 1);
gdk_draw_point (window, light_gc, x + 3, y + 1);
gdk_draw_point (window, dark_gc, x + 4, y + 2);
}
gdk_draw_point (window, light_gc, x + 3, y + 1);
gdk_draw_point (window, dark_gc, x + 4, y + 2);
}
gdk_gc_set_clip_rectangle (light_gc, NULL);
gdk_gc_set_clip_rectangle (dark_gc, NULL);
gdk_gc_set_clip_rectangle (light_gc, NULL);
gdk_gc_set_clip_rectangle (dark_gc, NULL);
gtk_draw_shadow (widget->style, window,
GTK_STATE_NORMAL, shadow,
rect->x, rect->y,
rect->width, rect->height);
gtk_draw_shadow (widget->style, window,
GTK_STATE_NORMAL, shadow,
rect->x, rect->y,
rect->width, rect->height);
}
}
static void
@ -706,7 +711,7 @@ gtk_handle_box_paint (GtkWidget *widget,
rect.width = (hb->handle_position == GTK_POS_LEFT) ? DRAG_HANDLE_SIZE : width;
rect.height = (hb->handle_position == GTK_POS_TOP) ? DRAG_HANDLE_SIZE : height;
draw_textured_frame (widget, hb->bin_window, &rect, GTK_SHADOW_OUT);
draw_textured_frame (widget, hb->bin_window, &rect, GTK_SHADOW_OUT, event ? &event->area : area);
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
{