aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--lib/widgets/ephy-spinner.c13
2 files changed, 15 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 009a6662f..dbf80a7b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2004-06-12 Christian Persch <chpe@cvs.gnome.org>
+
+ * lib/widgets/ephy-spinner.c: (ephy_spinner_new),
+ (ephy_spinner_init), (ephy_spinner_expose):
+
+ Make spinner not use a visible window, and fix coordinates
+ accordingly. Patch by Crispin Flowerday, fixes bug #134686.
+
2004-06-11 Christian Persch <chpe@cvs.gnome.org>
* src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_finalize):
diff --git a/lib/widgets/ephy-spinner.c b/lib/widgets/ephy-spinner.c
index 19ddae8bb..7467b85cb 100644
--- a/lib/widgets/ephy-spinner.c
+++ b/lib/widgets/ephy-spinner.c
@@ -105,7 +105,9 @@ ephy_spinner_get_type (void)
GtkWidget *
ephy_spinner_new (void)
{
- return GTK_WIDGET (g_object_new (EPHY_TYPE_SPINNER, NULL));
+ return GTK_WIDGET (g_object_new (EPHY_TYPE_SPINNER,
+ "visible-window", FALSE,
+ NULL));
}
static gboolean
@@ -164,8 +166,6 @@ ephy_spinner_init (EphySpinner *spinner)
{
GtkWidget *widget = GTK_WIDGET (spinner);
- GTK_WIDGET_UNSET_FLAGS (spinner, GTK_NO_WINDOW);
-
gtk_widget_set_events (widget,
gtk_widget_get_events (widget)
| GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
@@ -261,8 +261,8 @@ ephy_spinner_expose (GtkWidget *widget, GdkEventExpose *event)
x_offset = (widget->allocation.width - width) / 2;
y_offset = (widget->allocation.height - height) / 2;
- pix_area.x = x_offset;
- pix_area.y = y_offset;
+ pix_area.x = x_offset + widget->allocation.x;
+ pix_area.y = y_offset + widget->allocation.y;
pix_area.width = width;
pix_area.height = height;
@@ -274,7 +274,8 @@ ephy_spinner_expose (GtkWidget *widget, GdkEventExpose *event)
gc = gdk_gc_new (widget->window);
gdk_draw_pixbuf (widget->window, gc, pixbuf,
- dest.x - x_offset, dest.y - y_offset,
+ dest.x - x_offset - widget->allocation.x,
+ dest.y - y_offset - widget->allocation.y,
dest.x, dest.y,
dest.width, dest.height,
GDK_RGB_DITHER_MAX, 0, 0);