summaryrefslogtreecommitdiff
path: root/gtk/gtkpixmap.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@src.gnome.org>1998-11-06 22:05:02 +0000
committerOwen Taylor <otaylor@src.gnome.org>1998-11-06 22:05:02 +0000
commite2a521922085c8010028e227f61bba59ea6b8242 (patch)
tree2500d6aa6f63aab4b58c17546532ecce8fdcca37 /gtk/gtkpixmap.c
parent3c0df19a588bd96f328bda975db8eb9fa7f79e81 (diff)
downloadgtk+-e2a521922085c8010028e227f61bba59ea6b8242.tar.gz
Merge from themes-2. See the ChangeLog for a somewhat detailed
history of the evolution of the changes involved. Most of this is actually minor painting tweaks.
Diffstat (limited to 'gtk/gtkpixmap.c')
-rw-r--r--gtk/gtkpixmap.c32
1 files changed, 5 insertions, 27 deletions
diff --git a/gtk/gtkpixmap.c b/gtk/gtkpixmap.c
index 7a3cfb6848..9cc6ec0076 100644
--- a/gtk/gtkpixmap.c
+++ b/gtk/gtkpixmap.c
@@ -74,7 +74,6 @@ gtk_pixmap_init (GtkPixmap *pixmap)
pixmap->pixmap = NULL;
pixmap->mask = NULL;
- pixmap->needs_clear = FALSE;
}
GtkWidget*
@@ -82,13 +81,13 @@ gtk_pixmap_new (GdkPixmap *val,
GdkBitmap *mask)
{
GtkPixmap *pixmap;
-
+
g_return_val_if_fail (val != NULL, NULL);
-
+
pixmap = gtk_type_new (gtk_pixmap_get_type ());
-
+
gtk_pixmap_set (pixmap, val, mask);
-
+
return GTK_WIDGET (pixmap);
}
@@ -135,20 +134,11 @@ gtk_pixmap_set (GtkPixmap *pixmap,
}
if (GTK_WIDGET_VISIBLE (pixmap))
{
- /* If we aren't drawing the entire area, clear first */
- if (GTK_WIDGET_DRAWABLE (pixmap) &&
- ((mask != NULL) ||
- (GTK_WIDGET (pixmap)->requisition.width != oldwidth) ||
- (GTK_WIDGET (pixmap)->requisition.height != oldheight)))
- {
- pixmap->needs_clear = TRUE;
- }
-
if ((GTK_WIDGET (pixmap)->requisition.width != oldwidth) ||
(GTK_WIDGET (pixmap)->requisition.height != oldheight))
gtk_widget_queue_resize (GTK_WIDGET (pixmap));
else
- gtk_widget_queue_draw (GTK_WIDGET (pixmap));
+ gtk_widget_queue_clear (GTK_WIDGET (pixmap));
}
}
@@ -194,17 +184,6 @@ gtk_pixmap_expose (GtkWidget *widget,
pixmap = GTK_PIXMAP (widget);
misc = GTK_MISC (widget);
- if (pixmap->needs_clear)
- {
- gdk_window_clear_area (GTK_WIDGET (pixmap)->window,
- GTK_WIDGET (pixmap)->allocation.x,
- GTK_WIDGET (pixmap)->allocation.y,
- GTK_WIDGET (pixmap)->allocation.width,
- GTK_WIDGET (pixmap)->allocation.height);
-
- pixmap->needs_clear = FALSE;
- }
-
x = (widget->allocation.x * (1.0 - misc->xalign) +
(widget->allocation.x + widget->allocation.width
- (widget->requisition.width - misc->xpad * 2)) *
@@ -231,6 +210,5 @@ gtk_pixmap_expose (GtkWidget *widget,
gdk_gc_set_clip_origin (widget->style->black_gc, 0, 0);
}
}
-
return FALSE;
}